#include <iostream>
using namespace std;

int main() {
	char button;
	cin >> button;
	char answer;
	cin >> answer;
	if(button == 'Y') {
		if(answer >= 'a') {
			answer -= ('a' - 'A');
		}
	}
	else {
		if(answer <= 'Z') {
			answer += ('a' - 'A');
		}
	}
	cout << answer << "\n";
	return 0;
}

#include <iostream>
#include <iomanip>
#include <string>
using namespace std;

void Main() {
    // input
    char S;
    cin >> S;
    char T;
    cin >> T;




    // process
    char ans;
    if (S == 'Y') {
        ans = toupper(T);
    } else {
        ans = T;
    }


    // output
    cout << ans << endl;

}

int main() {
    std::cout << std::fixed << std::setprecision(15);
    Main();
    return 0;
}
