import sys

tags = []
for line in sys.stdin:
  tag = line.split('\t')[1]
  if not (tag in tags):
    tags.append(tag)
    print line,

C:\tmp> type src.txt | python hoge.py > dest.txt