x=open(0).read().split() 0in map(print,sorted(set(x),key=x.index))