while 1: s='';t=0 for c in raw_input():s+=chr(t*32^ord(c));t=c<'a' print s