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