include "pch.h"
include
using namespace std;
int main() {
char ch;
while (cin>>ch) {
if (ch >= 'A'&&ch <= 'Z') {
ch = ch + 32;
printf("%c\n", ch);
}
else if (ch >= 'a'&&ch <= 'z') {
ch = ch - 32;
printf("%c\n", ch);
}
else {
printf("%d\n", int(ch));
}
}
}