a='' while 1:b=raw_input(a)+'\n';a=' '*max(a.find(b[i:i+9])-i for i in range(50))+b