for(h={};$=readline();)for(c in a=$.split(' '))!h[x=a[c]]&&x?print(h[x]=x):0