#include<bits/stdc++.h>
#define rep(i, n) for(int i=0; i<n; i++)
#define rep2(i, a, b) for(int i=a; i<b; i++)
#define Pii pair<int, int>
#define Pll pair<ll, ll>
using namespace std;
using ll = long long;

int main(){
    char s, t;
    cin >> s >> t;
    if(s=='Y'){
        if(t=='a') cout<<'A'<<endl;
        if(t=='b') cout<<'B'<<endl;
        if(t=='c') cout<<'C'<<endl;
    }
    if(s=='N'){
        if(t=='a') cout<<'a'<<endl;
        if(t=='b') cout<<'b'<<endl;
        if(t=='c') cout<<'c'<<endl;
    }
    return 0;
}
#pragma region Macros
#include <bits/stdc++.h>

using namespace std;
using ll = long long;

#define REP2(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; ++i)
#define REP3(i, l, r) for (int i = (l), i##_len = (int)(r); i < i##_len; ++i)
#define GET_MACRO_REP(_1, _2, _3, NAME, ...) NAME
#define REP(...) GET_MACRO_REP(__VA_ARGS__, REP3, REP2) (__VA_ARGS__)
#define RREP2(i, n) for (int i = (n - 1); i >= 0; --i)
#define RREP3(i, l, r) for (int i = (r - 1), i##_len = (l); i >= i##_len; --i)
#define GET_MACRO_RREP(_1, _2, _3, NAME, ...) NAME
#define RREP(...) GET_MACRO_REP(__VA_ARGS__, RREP3, RREP2) (__VA_ARGS__)
#define IN(type, n) type n; cin >> n
#define INALL(type, v) REP(i, v.size()) { IN(type, _tmp); v.at(i) = _tmp; }
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x).size())

#ifdef _DEBUG
#define DEBUG(x) cout << #x << ": " << x << endl
#else
#define DEBUG(x)
#endif

template<class T>bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; }
void yes() { cout << "Yes" << endl; }
void no() { cout << "No" << endl; }
#pragma endregion

int main() {
  IN(char, S);
  IN(char, T);
  if (S == 'Y') {
    cout << (char)(T + ('A' - 'a')) << endl;
  } else {
    cout << T << endl;
  }


  return 0;
}
