# -*- coding: utf-8 -*- S = raw_input() print S.swapcase()