#include using namespace std; int main() { string S; cin >> S; for(int i = 0; i < S.length(); i++){ if(S[i] >= 'A' && S[i] <= 'Z'){ S[i] += 32; }else{ S[i] -= 32; } } cout << S << endl; return 0; }