i=0 while 1:a=input().split()*99;i+=a>[]!=print(a[i],end=' ')