#include<bits/stdc++.h>
using namespace std;

#define ll long long
#define mod 1000000007
#define inf 9223372036854775807
#define F first
#define S second
#define pb push_back
#define pf push_front
#define mp make_pair
#define pll pair<ll,ll>
#define vll vector<ll>
#define umap unordered_map<ll,ll>
#define lpq priority_queue<ll,vector<ll>,greater<ll>>
ll powe(ll n,ll r)
{if(!r)return 1;else if(r%2==0)return powe(n*n,r/2);else return n*powe(n*n,(r-1)/2);}
ll globe=0;

void solution() {
    char s,t;
    cin>>s>>t;
    if(s=='Y'){
        ll x=t-97;
        char a='A';
        a=a+x;
        cout<<a<<endl;
    }
    else{
        cout<<t<<endl;
    }
}

int main() {
    
    ios::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    ll T=1;
    //cin>>T;
    while(T--) {
        solution();
    }

    return 0;
}
#include <bits/stdc++.h>
using namespace std;


#define INF 1000000000


int main() {
    int a, b;
    scanf("%d %d", &a, &b);
    int ans;
    if (a+b>=15 && b>=8) {
        ans = 1;
    }
    else if (a+b>=10 && b>=3) {
        ans = 2;
    }
    else if (a+b>=3) {
        ans = 3;
    }
    else {
        ans = 4;
    }
    printf("%d\n", ans);
    return 0;
}
