#include <bits/stdc++.h>
using namespace std;
int main(){
	char n;
	cin>>n;
	if(n>='A'&&n<='Z') cout<<char(n+32);
	else cout<<char(n-32);
}
/**************************************************************
	Problem: 1971
	User: wangyiyang
	Language: C++
	Result: Accepted
	Time:24 ms
	Memory:2072 kb
****************************************************************/