#include using namespace std; int main(){ string s; cin >> s; string S; for(char c : s){ S += ( islower(c)?toupper(c):tolower(c) ); } cout << S << endl; return 0; }