S = input() ans = '' for i in S: x = ord(i) ans += chr([x+32, x-32][x >= 97]) print(ans)