from itertools import* for z in product(*id(0)%5*[raw_input()]):print`z`[2::5]