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