<filename>Codeforces/95 Beta Division 2/Problem A/A.py
s = raw_input()
if s.upper() == s or s[1:].upper() == s[1:]: print s.swapcase()
else: print s

<filename>Codeforces/95 Beta Division 2/Problem A/A.py
s = raw_input()
if s.upper() == s or s[1:].upper() == s[1:]: print s.swapcase()
else: print s
