# -*- coding: utf-8 -*-
# @Author: Zeyuan Shang
# @Date:   2016-05-04 13:19:30
# @Last Modified by:   Zeyuan Shang
# @Last Modified time: 2016-05-04 13:19:43
import string
print string.swapcase(raw_input())
add swap-case