n=0 while 1: a=raw_input().split()*30 if a:print a[n],;n+=1