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