inp = raw_input() ans = "" for l in inp: if l.islower(): ans += l.upper() else: ans += l.lower() print ans