N = int(input())
company = set()
for _ in range(N):
name, action = input().split()
if action == "enter":
company.add(name)
else:
company.remove(name)
for i in company:
print(i)
To embed this project on your website, copy the following code and paste it into your website's HTML: