#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
const int N=2e5+10;

int ans[N];
vector <int> g[N];
struct node{
    int step;
    int num;
}p;
int a[N];
int b[N];

int main()
{
    int x,y,z;
    cin>>x>>y>>z;
    if(x==y)cout<<z;
    else if(x==z) cout<<y;
    else if(y==z) cout<<x;
    else cout<<0;
}

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

int main() {
    char S, T; cin >> S >> T;
    if(S == 'Y'){
        char t = toupper(T);
        cout << t << endl;
    } else {
        cout << T << endl;
    }

    return 0;
}