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