People in the Company

No attempts yetTime limit1sMemory limit256 MB

Problem

Sanggeun works at Giggle, a global software company. The company's most distinctive feature is its flexible working hours, so employees are not required to be in the office from 9 to 6.

Each employee may arrive whenever they want and leave whenever they want.

Sanggeun has the log from everyone's access-card system. The log records whether a person entered (enter) or left (leave) the company. Given the log, write a program that determines everyone who is currently in the company.

Input

The first line contains nn, the number of access records in the log. (2n1062 \le n \le 10^6)

Each of the next nn lines contains one access record, in order: a person's name followed by either enter or leave, separated by a space. enter means arriving at work and leave means leaving work.

No two people share a name, and names that differ in letter case are considered different. Each name is a string of at most 5 uppercase and lowercase English letters.

Output

Print the names of the people currently in the company in reverse dictionary order, one per line. If no one is in the company, print nothing.