#include using namespace std; typedef unsigned long long ul; typedef signed long long ll; ul over = 1000000007; int main(void) { cin.tie(0); ios::sync_with_stdio(false); cout << fixed; string s; cin >> s; for (auto c : s) { if ('a' <= c && c <= 'z') { cout << (char)(c-'a'+'A'); } else { cout << (char)(c-'A'+'a'); } } cout << endl; return 0; }