while 1: a,b=raw_input() for d in':8GgxzkK': p=int(b)*16+ord(a)-ord(d)-24 if 136&p<1:print chr(p%16+97)+`p/16+1`, print