if __name__ == "__main__": str = [s for s in input()] res = "" for j in str: if j.islower() == True: #小文字 res += j.upper() else: #大文字 res += j.lower() print(res)