r=raw_input() while 1:print r;r,b=r.split(' ',1);r+=b