while 1:s=input();print(*[x+y for x in'abcdefgh'for y in'12345678'if~int(x+y+s,24)**4%577^4<4])