#include <bits/stdc++.h>
using namespace std;
int main() {
  string s; getline(cin, s);
  for (char c : s) if (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z') cout << char(c ^ 32); else cout << c;
  cout << endl;
}
