print(''.join([[s.upper(),s.lower()][s.isupper()] for s in input()]))