#include <iostream>
#include <cctype>
using namespace std;
int main() {
char a;
while((a = cin.get()) != EOF){
if(islower(a)) a = toupper(a);
else a = tolower(a);
cout << a;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y2N0eXBlPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwogCmludCBtYWluKCkgewogICAgY2hhciBhOwogICAgd2hpbGUoKGEgPSBjaW4uZ2V0KCkpICE9IEVPRil7CiAgICAgICAgICAgICAgaWYoaXNsb3dlcihhKSkgYSA9IHRvdXBwZXIoYSk7CiAgICAgICAgICAgICAgZWxzZSBhID0gdG9sb3dlcihhKTsKICAgICAgICAgICAgICBjb3V0IDw8IGE7CiAgICB9CiAgICByZXR1cm4gMDsKfQ==