#include <iostream>
#include <vector>
#include <algorithm>

#include <string>
#include <cmath>

using namespace std;

int main()
{
	int A,B,C;
	int ans;
	cin >> A >> B >> C ;

	if (A == B)
	{
		cout << C;
	}
	else if (B == C)
	{
		cout << A;
	}
	else if (A == C)
	{
		cout << B;
	}
	else
	{
		cout << 0;
	}
}
#include<bits/stdc++.h>
using namespace std;
#define int long long
int a,b,k;
int gcd(int x,int y)
{
    if(y==0) return x;
    else return gcd(y,x%y);
}
void dfs(int n,int m,int x)
{
	if(n==0){while(m--)cout<<'b';return;}
	if(m==0){while(n--)cout<<'a';return;}
	int q=1,w,ci=n+m-1,hh=1,yue=max(n-1,m),shao=min(m,n-1);
	for(int i=yue+1,j=1;i<=ci;i++,j++)
	{
		if(j<=shao)hh*=j;
		q*=i;w=gcd(q,hh);
		q/=w;hh/=w;
	}
	if(q<x){cout<<'b';dfs(n,m-1,x-q);}
	else {cout<<'a';dfs(n-1,m,x);}
}
signed main()
{
	scanf("%lld%lld%lld",&a,&b,&k);
	dfs(a,b,k);
	return 0;
}
