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