#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9+7;
//const long long MOD = 998244353;
const long long INF_LL = 1e18+11; const int INF_int = 1e9+11;
#define ll long long
#define mp std::make_pair
#define rep(i,n) for(int i = 0;i<n;i++)
#define lrep(i,n) for(long long i = 0;i<n;i++)
#define All(a) a.begin(),a.end()
#define Debug_Output_ALL(a) for(auto x:a) cout << x << " ";cout << endl;
#define endl "\n"
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return true; } return false; }
void fast(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
}
int main(){
    fast();
    map<char,char> tr;
    tr['a']='A';tr['b']='B';tr['c']='C';
    char s,t;
    cin >> s >> t;
    if(s=='Y') cout << tr[t] << endl;
    else cout << t << endl;
}
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
int main(){
    string s, t;
    cin >> s >> t;
    if(s[0] == 'Y'){
        printf("%c\n", t[0]+('A'-'a'));
    } else {
        cout << t << endl;
    }
}