s = list(input()) for si in s: if si.islower(): print(si.upper(), end="") else: print(si.lower(), end="") print()