while 1: r=raw_input() for c in'vteaA=.,': k=int(r,18)-ord(c) if~k%18<8