#include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) typedef long long ll; int main() { string S; cin >> S; for (int i = 0; i < S.length(); i++){ char x = S[i]; if((x >= 'a') && (x <='z' )){ printf("%c",toupper(x)); } else if((x >= 'A') && (x <= 'Z')) { printf("%c",tolower(x)); } } }