#!/usr/bin/env python3 #fileencoding: utf-8 print(input().strip().swapcase())