S=list(input()) O='' for A in S: if A.islower():O+=A.upper() else:O+=A.lower() print(O)