z=[] while 1: for v in raw_input().split(): if(v in z)-1:print v;z+=v,