#include <stdio.h>
char upper(char c) {
int position;
if (c >= 'a' && c <= 'z') {
position = c - 'a';
c = 'A' + position;
}
if (c >= 'A' && c <= 'Z') {
position = c - 'A';
c = 'a' + position;
}
return c;
}
int main() {
char a;
while ((a = getchar()) != '.') {
printf("%c", upper(a));
}
return 0;
}