#include <stdio.h>

int main()
{
    int arr[3], remaining = 0;
    scanf("%d %d %d", &arr[0], &arr[1], &arr[2]);

    bool flag = false;
    for (int i = 0; i <= 1; i++)
    {
        for (int j = i + 1; j <= 2; j++)
        {
            if (arr[i] == arr[j])
            {
                flag = true;
                if (i == 1)
                {
                    remaining = arr[0];
                }
                else
                {
                    (j == 1) ? remaining = arr[2] : remaining = arr[1];
                }
                break;
            }
        }
        if (flag && remaining != 0)
        {
            break;
        }
    }

    printf("%d\n", remaining);

    return 0;
}
#pragma GCC optimize("Ofast")
/*#pragma GCC target("avx,avx2,fma")
#pragma GCC target ("sse4")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")*/
#include<bits/stdc++.h>
using namespace std;
#define ll long long 
#define ld double 
#define rep(i,a,b) for(ll i=a; i<b; ++i)
#define BOOST std::ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define pb push_back
#define all(v) v.begin(),v.end()
#define sl(a) a.size()
#define mod 1000000007 
#define lcm(a,b) (a*b)/__gcd(a,b)
#define MAX1 100006
#define f first
#define s second
#define pi 2*acos(0.0)
bool isPowerOfTwo (ll x) {  return x && (!(x&(x-1)));  }
ll Modular_Exponentiation(ll x, ll n, ll M)
{
    if(n==0) return 1;
    if(n%2) return (x*Modular_Exponentiation((x*x)%M,n/2,M))%M;
    else return (Modular_Exponentiation((x*x)%M,n/2,M))%M;
}
bool isPrime(ll n) 
{ 
    if (n<=1)  return false; 
    if (n<=3)  return true; 
    if (n%2==0||n%3==0) return false; 
    for(ll i=5; i*i<=n; i+=6) 
        if (n%i==0||n%(i+2)==0) return false; 

    return true; 
}
/********************************************************************************************/
void solve()
{
    char s,t; cin>>s>>t;
    if(s=='Y') cout<<char(toupper(t));
    else cout<<t;
}
int32_t main()
{
    #ifndef ONLINE_JUDGE
    // for getting input from input.txt
    freopen("input.txt","r",stdin);
    //for getting error from error.txt
    freopen("error.txt", "w", stderr);
    // for writing output to output.txt
    freopen("output.txt","w",stdout);
    #endif
    BOOST
    int T=1; //cin>>T;
    while(T--) solve();
    cerr<<"Time taken : "<<fixed<<setprecision(5)<<((float)clock()/CLOCKS_PER_SEC)*1000<<" ms"<<"\n";
    cerr<<"My CLOCKS_PER_SEC= "<<CLOCKS_PER_SEC<<"\n";
    return 0;
}

