#include <bits/stdc++.h>
using namespace std;
int main() {
  char S, T;
  cin >> S >> T;
  if(S == 'N') {
    cout << T << endl;
  }
  else {
    if(T == 'a') {
      cout << "A" << endl;
    }
    else if(T == 'b') {
      cout << "B" << endl;
    }
    else {
      cout << "C" << endl;
    }
  }
  return 0;
}
#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using vb = vector<bool>;
using vl = vector<long>;
using vs = vector<string>;
using vvi = vector<vector<int>>;
using vvb = vector<vector<bool>>;
using vvc = vector<vector<char>>;
using vvl = vector<vector<long>>;
using pii = pair<int, int>;
using pil = pair<int, long>;
using pll = pair<long, long>;
#define fix20 cout << fixed << setprecision(20)
#define YES cout << "Yes" << endl
#define NO cout << "No" << endl
#define rep(i,n) for(long i=0; i<(long)(n);i++)
#define REP(i,s,t) for(long i=s; i<t; i++)
#define RNG(i,s,t,u) for(long i=s; i<t; i+=u)
#define MOD 1000000007
#define all(vec) vec.begin(), vec.end()
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }

int main(){
  char s,t;
  cin >> s >> t;
  if(s == 'Y'){
    if(t == 'a') cout << "A" << endl;
    else if(t == 'b') cout << "B" << endl;
    else cout << "C" << endl;
  }
  else cout << t << endl;
  //cout << 'A'-'a' << endl;
}