#include<bits/stdc++.h>
#define ll long long
using namespace std;
ll A[500009];
vector<ll> G[200009];
ll cg[60+5];
vector<ll> gc;
ll seed = 324;
ll dp[(1LL<<15)*5];
ll ans = 0;
ll cnt = 0;
ll N,M,p;
ll cal(ll ind)
{
    ll i,j,k;
    ll ret = 0;
    for(i = 0;i < G[ind].size();i++)
    {
        ll u = G[ind][i];
        if(cg[u] < 0) continue;
        ret += (1LL<<cg[u]);
    }
    return ret;
}
void Print(ll a)
{
    ll i,j;
    for(i = 0;i < M;i++)
    {
        if((a & (1LL<<i)) > 0)
        {
            cout << 1;
        }
        else
        {
            cout << 0;
        }
    }
    cout << endl;
}
ll Rand()
{
    return seed = (seed*seed+1) % 1000000007;
}
int main()
{
    ll T,i,j,k;
    ios_base::sync_with_stdio(false);
    string str;
    cin.tie(0);
    cin >> N >> M >> p;
    for(i = 0;i < N;i++)
    {
        cin >> str;
        for(j = 0;j < M;j++)
        {
            if(str[j] == '1') G[i].push_back(j);
        }
    }
    ll ts = 50;
    while(ts--)
    {
        ll t = Rand()%N;
        //cout << "t = " << Rand() << endl;
        for(i = 0;i < M;i++) cg[i] = -1;
        ll tp = 0;
        gc.clear();
        for(i = 0;i < G[t].size();i++)
        {
            cg[G[t][i]] = tp++;
            gc.push_back(G[t][i]);
        }
        if(tp == 0) continue;
        for(i = 0;i < (1<<p);i++) dp[i] = 0;
        for(i = 0;i < N;i++)
        {
            dp[cal(i)^((1<<tp)-1)]++;
        }
        for(i = 0;i < tp; ++i)
        {
            for(int mask = 0; mask < (1<<tp); ++mask)
            {
                if(mask & (1<<i))
                    dp[mask] += dp[mask^(1<<i)];
            }
        }
        for(k = 0;k < (1<<tp);k++)
        {
            i = (((1<<tp)-1)^k);
            //if(i == 0) continue;
            if(dp[k] >= (N+1)/2)
            {
                if(__builtin_popcountll(i) > cnt)
                {
                    cnt = __builtin_popcountll(i);
                    ans = 0;
                    for(j = 0;j < tp;j++)
                    {
                        if(i & (1 << j))
                        {
                            //cout << "gc[j] = " << gc[j] << endl;
                            ans += (1LL << gc[j]);
                        }
                    }
                    //cout << "ans = " << ans << endl;
                }

            }
        }
    }
    assert(__builtin_popcountll(ans) == cnt);
    Print(ans);
}
