data = input() list = list(data) for i in list: if i.islower(): list[list.index(i)] = i.upper() elif i.isupper(): list[list.index(i)] = i.lower() print(''.join(list))