#include using namespace std; int main() { string S; cin >> S; int i; for(i=0; S[i]!='\0'; i++){ if('A'<=S[i]&&S[i]<='Z'){ //char tmp = S[i]; S[i] += 32; } else if('a'<=S[i]&&S[i]<='z'){ S[i] -= 32; } } for(int k=0; k<=i; k++){ cout << S[k]; } cout << endl; }