#!/usr/bin/env python inpwd = input() print(inpwd.swapcase())