r=-2,-1,1,2 while 1:x,y=map(ord,raw_input());print" ".join("%c%c"%(x+i,y+j)for i in r for j in r if(96<x+i<105)*(48<y+j<57)*(abs(i*j)==2))
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page