#include using namespace std; #define REP(i, n) for(int i = 0; i < n; i++) int main() { string s; cin >> s; REP(i, s.length()) { if (islower(s[i])) { s[i] = toupper(s[i]); } else { s[i] = tolower(s[i]); } } cout << s << endl; return 0; }