while 1:s,t=raw_input().split();exec'print s,;s,t=t,t+s;'*8;print