Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- R=dict(a='eD',b='q',d='pP',h='y',l='l',m='w',n='uU',o='oOGQ',s='sS',t='t',x='xX',z='zZ',A='vV',B='E',D='G',H='H',I='I',M='W',N='N')
- V='ijlmnotuvwxyAHIMOQTUVWXY'
- W=dict(b='d',p='q',s='z',B='E',G='D',S='Z')
- H='lotxBCDEHIKOX'
- T='AHIMOTUVWXYilmnotuvwxy'
- s=raw_input()
- r=v=h=t=1
- for i,j in R.items():
- for c in j:R[c]=R.get(c,'')+i
- for i,j in W.items():
- for c in j:W[c]=W.get(c,'')+i
- for i in range(len(s)):
- c,l=s[i],s[-i-1]
- r&=(c in R)+(l in R[c])>1
- v&=(c in V)+(l in V)>1
- h&=(c in H)+(l in H)>1
- t&=c in T
- print'R'*r+'V'*v+'H'*h+'T'*t
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement