/*
Another source code by:

  _   _ _ _   _        _____       _   
 | \ | (_) | (_)      / ____|     | |  
 |  \| |_| |_ _ _ __ | |  __ _ __ | |_ 
 | . ` | | __| | '_ \| | |_ | '_ \| __|
 | |\  | | |_| | | | | |__| | |_) | |_ 
 |_| \_|_|\__|_|_| |_|\_____| .__/ \__|
                            | |        
                            |_|        
*/                            
#include<bits/stdc++.h>
#include <vector>
using namespace std;
#define vi vector<int>
#define pb push_back
#define p push
#define sll stack<long long>
#define qll queue<long long>
#define vll vector<long long unsigned>
#define st string
#define vvll vector<vll>
#define vstr vector <string>
#define vp vector <pair<ll,ll>>
#define fori(n) for(ll i=0;i<n;i++)
#define forj(n) for(int j=0;j<n;j++)
#define fork(n) for(int k=0;k<n;k++)
#define fori1(n) for(int i=1;i<n;i++)
#define f(i,a,b) for(int i=a;i<=b;i++)
#define s(v) sort(v.begin(),v.end())
#define sr(v) sort(v.rbegin(),v.rend())
#define ll long long
#define MOD 1000000007
#define pi 3.14159265358979323
#include <math.h>
#define yn(n) if(n)cout<<"yes\n";else cout<<"no\n";
#define Yn(n) if(n)cout<<"Yes\n";else cout<<"No\n";
#define YN(n) if(n)cout<<"YES\n";else cout<<"NO\n";
#define mp   make_pair 
#define ff first
#define ss second


ll gcd(ll a, ll b){if(b==0)return a;return gcd(b, a%b);}
ll lcm(ll a, ll b){return a*b/gcd(a, b);}
ll modify(ll n){ll res = n;res%=MOD;res+=MOD;res%=MOD;return res;}
ll md(ll n){if(n>0)return n;else return -n;}
//ll mv(vll v){ll m=v[0];fori(v.size()){m=max(v[i],m);}return m;}
vll read(ll n){vll v(n);fori(n)cin>>v[i];return v;}
void out(vll v){fori(v.size()){cout<<v[i]<<" ";}cout<<"\n";}


void solve(){
    ll a,b,k;
    cin>>a>>b>>k;
    if(b==0){
        fori(a)cout<<"a";
        return;
    }//cout<<k;
    vll v2(61,0);
    vvll v(61,v2);
    fori(61)v[0][i]=1;
    fori(61)v[i][0]=1;
    for(int i=1;i<61;i++){
        for(int j=1;j<61;j++){
            v[i][j]=v[i][j-1]+v[i-1][j];
            //if(v[i][j]==118264581564861424)cout<<i<<j;
        }
    }
    
    ll a1=a,b1=b;
    fori(a1+b1){
        if(a==0){while(b--)cout<<"b";return;}
        if(b==0){while(a--)cout<<"a";return;}
        //cout<<k<<" "<<v[a+b-2][a-1]<<"\n";
        if(a+b>=1){
            if(k>v[b][a-1]){
                cout<<"b";
                k-=v[b][a-1];b--;
            }
            else {
                cout<<"a";a--;
            }
        }
    }
}
int main(){
    
#ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
#endif 
        
    int t;
    t=1;
    //cin >> t;
    while(t--){
        solve();
        
    }

    
    cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC << "ms\n";

}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
 
using namespace std;
using namespace __gnu_pbds;
 
#define fastio ios_base::sync_with_stdio(0);cin.tie(0)
#define fp(i,a,b) for(ll i=a ; i<b ; i++)
#define fn(i,a,b) for(int i=a ; i>=b ; i--)
#define ones(x) __builtin_popcount(x)
#define pb push_back
#define mk make_pair
#define ff first
#define ss second
#define all(x) x.begin(),x.end()
#define dbg(x) cout << (#x) << " = " << x << " "
#define fini cout << "\n";
#define line cout << "-----------------------------------\n";
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef tree<
ll,
null_type,
less_equal<ll>,
rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;
 
int read (){
    int x = 0, f = 1; char s = getchar();while (s < '0' || s > '9') {if (s == '-') f = -1; s = getchar();}
    while (s >= '0' && s <= '9') x = x * 10 + s - '0', s = getchar();
    return x * f; 
}
const ll M=5e2+7;
const ll N=2e7+7;
const ll inf=1e18;
const ll mod=1e9+7;
const ll mod2=998244353;

int n,m;
ll cnt[25];

void go(int ide){
	cin >> n >> m;

	fp(i,0,n){
		string s; cin >> s;
		int x = 0;

		for (char c : s) x += (c == '1');
		cnt[x]++;
	}

	ll ans = 0;
	fp(i,0,m+1) fp(j,i+1,m+1)
		if ((i+j)&1) ans += cnt[i]*cnt[j];

	cout << ans << "\n";
}

int main(){
    fastio;
    int tst=1;
    // cin >> tst;
    // cout << fixed << setprecision(12);
    fp(i,0,tst) go(i+1);
 
    return 0;
}