import re s=raw_input() exec"print s;s=re.sub('.[a-z]*$',lambda m:m.group().swapcase(),s);"*2**len(s)