r=raw_input() for c in'XXXXXXXXXXXX':i=ord(c);print~60495%i/4*" "+'hxmo'[(i%12==int(r[3:])/5)^(i-int(r[:2]))%-12/42]+i/42*"\n",