import re a=input() while a!=id:print(a);id,a=a,re.sub(r'(?