//! 尺卂乃卂.卂ﾌ乇乇ㄒ
#include<bits/stdc++.h>
//#include <ext/pb_ds/detail/standard_policies.hpp>
using namespace std;
//Using namespace __gnu_pbds;
//typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> Ordered_set;

#define ll              long long
#define int             long long
#define ld             long double
#define pb              push_back
#define pii             pair<int,int>
#define vi              vector<int>
#define vii             vector<vi>
#define vip            vector<pii>
#define mii             map<int,int>
#define mip             map<pair<int,int>,int>
#define mic             map<char,int> 
#define all(v)          v.begin(),v.end()  
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define lb(x)           (x&(-x))
#define mod             1000000007
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define w(x)            int x; cin>>x; while(x--)
#define itr(it,v)          for(auto it:v)
#define show(arr,n)     for(int i=0;i<n;i++) cout<<arr[i]<<" "; cout<<"\n";
#define fi(i,n)         for(int i=0;i<n;i++)
#define fir(i,k,n)       for(int i=k;k<n?i<n:i>n;k<n?i+=1:i-=1)
#define ff               first 
#define ss               second
#define deb(x) cout << #x << "=" << x << endl
#define FIO ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define check(x) (x && cout<<"Yes\n")||(cout<<"No\n");
#define fin(s)          freopen(s,"r",stdin);  
#define fout(s)         freopen(s,"w",stdout);

const ld pi = 3.141592653589793238462643383279502884;
const int xd[]={-1,0,1,0};
const int yd[]={0,-1,0,1};
int XX[] = { -1, -1, -1, 0, 0, 1, 1, 1 };
int YY[] = { -1, 0,  1, -1, 1, -1, 0, 1 };

int expo(int a,int b,int m);
int mmi(int a,int m);
void ipgraph(int m);

const int N=5*(1e5)+10;
vii adj(N);
int a[N];

void  solve(){

}
int dp[31][31];
int32_t main()
{
    FIO
    int a,b,c; cin>>a>>b>>c;
    dp[0][0]=1;
    fi(i,31){
        fi(j,31){
            if(i>0 || j>0)
            dp[i][j]=0;
            if(i>0) dp[i][j]+=dp[i-1][j];
            if(j>0) dp[i][j]+=dp[i][j-1];
        }
    }
    int x=a+b;
    while(a>0 && b>0){
        if(c>dp[a-1][b]){
            c=c-dp[a-1][b];
            cout<<'b';
            b--;
        }
        else{
            a--;
            cout<<'a';
        }
    }
    while(a>0) {
        cout<<'a';
        a--;
    }
    while(b>0){
        cout<<'b';
        b--;
    }
    cout<<"\n";
    return 0;

}

void ipgraph(int m){
    int i, u, v;
    while(m--){
          cin>>u>>v;
         u--, v--;
    adj[u].pb(v);
    adj[v].pb(u);
    }
}
int expo(int a,int b,int m){
    if(b==0) return 1;
    if(b==1) return a;
    int val=(expo(a,b/2,m)*expo(a,b/2,m))%m;
    if(b & 1) return (val*a)%m;
    else return val;
}
int mmi(int a,int m){
    return expo(a,m-2,m);
}
#include<bits/stdc++.h>
#define ull unsigned long long
#define ll int64_t 
#define f(i,s,e) for(i=s;i<e;++i)
#define endl << "\n"
#define sp << " "
#define INF INFINITY
#define mset(a,b) memset(a,b,sizeof(a))
#define mod 1000000007
#define mp(a,b) make_pair(a,b)
#define F first
#define S second
#define all(x) x.begin(),x.end()
#define FAST_IO ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
#define PI acos(-1) 
#define pb(a) push_back(a)
#define pf(a) push_front(a)
#define CY cout << "YES\n"
#define CN cout << "NO\n"
#define print(x) for(auto it:x) cout<<it<<' '; cout<<"\n";

#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
using namespace std;
ll fpower(ll x,ll y) // without mod
{
	if(!x)
		return x;
	if(!y)
		return 1;
	return (y&1) ? x*fpower(x*x,y>>1) : fpower(x*x,y>>1) ;
}
bool isWin(vector<ll>&arr1,vector<ll>&arr2)
{
	ll s1,s2;
	s1 = s2 = 0;
	ll i;
	f(i,1,10)
	{
		s1 += i*(fpower(10,arr1[i]));
		s2 += i*(fpower(10,arr2[i]));
	}
	if(s1>s2)
		return true;
	return false;
}

int main()
{
	FAST_IO ;
	ll i,j,k,n;
	cin >> k;
	n = k;
	string s,t;
	vector<ll>arr1(10,0),arr2(10,0),available(10,0);
	cin >> s >> t;
	f(i,0,s.size()-1)
		arr1[s[i]-'0']++;
	f(i,0,t.size()-1)
		arr2[t[i]-'0']++;
	for(i=1;i<=9;i++)
		available[i] = k - arr1[i] - arr2[i];
	// print(available);
	ll total = 0;
	ll win = 0;
	for(i=1;i<=9;i++)
	{
		for(j=1;j<=9;j++)
		{
			if(!available[i]||!available[j])
				continue;
			arr1[i]++;
			arr2[j]++;
			if(i==j)
				total += available[i]*(available[j]-1);
			else
				total += available[i]*available[j];
			if(isWin(arr1,arr2))
			{
				if(i==j)
					win += available[i]*(available[j]-1);
				else
					win += available[i]*available[j] ;
			}
			arr1[i]--;
			arr2[j]--;
		}
	}
	// cout << win sp << total endl;
	double ans;
	ans = win/(double)total;
	cout << setprecision(20) << ans endl;
	return 0;
}

/*
If u haven't come up with an approach yet ,skip this one
  Try this when feeling stuck -
  1. Int overflow, array bounds
  2. Special cases (n=1?)
  3. Prove your approach to yourself(mathematical induction,counter-intuitive or stronger test cases)
  4. Calm down and don't look at standings and stop thinking about rating and think about the question
  5. Just do it! 
*/ 

//Benq's advice - 
/* 
	And following advices are must for me -
	* do something instead of nothing and stay organized
	* WRITE STUFF DOWN 
*/

//#define _GLIBCXX_DEBUG 
// It will convert WA verdict to runtime error if that error is caused due to out of bound excess , declare it at the top
//#pragma GCC optimize "trapv" 
// It will convert WA to runtime error if WA was caused due to int overflow error,declare it anywhere
