Problem: <image>

William is hosting a party for n of his trader friends. They started a discussion on various currencies they trade, but there's an issue: not all of his trader friends like every currency. They like some currencies, but not others.

For each William's friend i it is known whether he likes currency j. There are m currencies in total. It is also known that a trader may not like more than p currencies.

Because friends need to have some common topic for discussions they need to find the largest by cardinality (possibly empty) subset of currencies, such that there are at least ⌈ n/2 ⌉ friends (rounded up) who like each currency in this subset.

Input

The first line contains three integers n, m and p (1 ≤ n ≤ 2 ⋅ 10^5, 1 ≤ p ≤ m ≤ 60, 1 ≤ p ≤ 15), which is the number of trader friends, the number of currencies, the maximum number of currencies each friend can like.

Each of the next n lines contain m characters. The j-th character of i-th line is 1 if friend i likes the currency j and 0 otherwise. It is guaranteed that the number of ones in each line does not exceed p.

Output

Print a string of length m, which defines the subset of currencies of the maximum size, which are liked by at least half of all friends. Currencies belonging to this subset must be signified by the character 1.

If there are multiple answers, print any.

Examples

Input


3 4 3
1000
0110
1001


Output


1000


Input


5 5 4
11001
10101
10010
01110
11011


Output


10001

Note

In the first sample test case only the first currency is liked by at least ⌈ 3/2 ⌉ = 2 friends, therefore it's easy to demonstrate that a better answer cannot be found.

In the second sample test case the answer includes 2 currencies and will be liked by friends 1, 2, and 5. For this test case there are other currencies that are liked by at least half of the friends, but using them we cannot achieve a larger subset size.

Solution (in CPP):

Solution:
// Chandra Mouli 1912143

#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")

#include <bits/stdc++.h>
using namespace std;

/* <--------- Data Types ---------> */

typedef long long int ll;
typedef unsigned long long int ull;

/*  <--------- Loops --------->  */

#define f(i,a,b) for(ll i=a;i<b;i++)
#define f2(i,a,b) for(ll i=a;i<b;i+=2)
#define fr(j,a,b) for(ll j=b-1;j>=a;j--)

/*  <--------- Vectors --------->  */

#define vi vector <int>
#define vmi vector <vi>
#define vll vector <ll>
#define vmll vector <vll>

/*  <--------- Pairs --------->  */

#define pi pair <int,int>
#define pll pair <ll,ll>

/*  <--------- Vectors of Pairs --------->  */

#define vpi vector< pi >
#define vpll vector< pll >

/*  <--------- Sets --------->  */

#define si set <int>
#define sll set <ll>
#define musi multiset <int>
#define musll multiset <ll>

/*  <--------- Maps --------->  */

#define mii map<int, int>
#define mvi map<int, vi>

/*  <--------- Tuples --------->  */

#define tiii tuple<int,int,int>

/*  <--------- Queues --------->  */

#define pq priority_queue <int>

/*  <--------- Shortcuts --------->  */

#define wl while
#define e "\n"
#define spc " "
#define pb push_back
#define ins insert
#define lb lower_bound
#define ub upper_bound
#define F first
#define S second
#define all(a) a.begin(),a.end()
#define sz(a) a.size()
#define mset(a,x) memset(a,x,sizeof(a))


/*  <--------- Sortings --------->  */

#define vsort(a) sort(a.begin(),a.end())
#define vrsort(a) sort(a.begin(),a.end(),greater< ll >())
#define vprsort(a) sort(a.rbegin(),a.rend())


/* <--------- FastIO ---------> */


#define Sravani() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define tc() int t;cin>>t;wl(t--)

#define get(a,n) vll a(n); f(i,0,n) cin>>a[i]
#define getmat(a,n,m) vmll a(n, vll(m)); f(i,0,n) f(j,0,m) cin>>a[i][j];

#define put(a,n) f(i,0,n) cout<<a[i]<<spc; cout<<e
#define putmat(a,n,m) f(i,0,n) {f(j,0,m) cout<<a[i][j]<<spc; cout<<e;} cout<<e


/*  <--------- Debugging --------->  */

#ifndef ONLINE_JUDGE
#define deb(x) cerr << #x <<" "; _deb(x); cerr << endl;
#else
#define deb(x)
#endif

void _deb(ll t) {cerr << t;}
void _deb(int t) {cerr << t;}
void _deb(string t) {cerr << t;}
void _deb(char t) {cerr << t;}
void _deb(double t) {cerr << t;}

template <class T, class V> void _deb(pair <T, V> p);
template <class T> void _deb(vector <T> v);
template <class T> void _deb(set <T> v);
template <class T, class V> void _deb(map <T, V> v);
template <class T> void _deb(multiset <T> v);
template <class T, class V> void _deb(pair <T, V> p) {cerr << "{"; _deb(p.F); cerr << ","; _deb(p.S); cerr << "}";}
template <class T> void _deb(vector <T> v) {cerr << "[ "; for (T i : v) {_deb(i); cerr << " ";} cerr << "]";}
template <class T> void _deb(set <T> v) {cerr << "[ "; for (T i : v) {_deb(i); cerr << " ";} cerr << "]";}
template <class T> void _deb(multiset <T> v) {cerr << "[ "; for (T i : v) {_deb(i); cerr << " ";} cerr << "]";}
template <class T, class V> void _deb(map <T, V> v) {cerr << "[ "; for (auto i : v) {_deb(i); cerr << " ";} cerr << "]";}


/*  <---- constants ---->  */

const ll mod = 1e9+7;
const ll maxN = 2e5 + 1;
const ll inf = 1e9;
const ll INF = 1e16;

/*  <---- most used funtions ---->  */

ll gcd (ll a, ll b);
ll lcm(ll a, ll b);
bool isPrime(ll n);
bool sortbysec(const pair<int,int> &a, const pair<int,int> &b);
void sieve();
ll modExp(ll b, ll n);

/*  <--------- Global Variables --------->  */


void solve()
{
    int n,m,p; cin>>n>>m>>p;
    string s[n];
    f(i,0,n) cin>>s[i];

    vll a(n);

    f(i,0,n)
    {
        ll x = 0, mask = 1;
        f(j,0,m)
        {
            if(s[i][j] == '1') x += mask;
            mask<<=1;
        }
        a[i] = x;
    }
    deb(a);

    random_shuffle(all(a));
    ll ans = 0,mx = 0;

    deb(a);
    f(i,0,min(50,n))
    {
        vll set_bits; 
        f(j,0,m) if((a[i] >> j) & 1) set_bits.pb(j) ;
        ll p = sz(set_bits); 
        vll sub_mask_cnt(1<<p,0); 
        f(j,0,n) {
            ll msk = 0 ; 
            for(int k = 0 ; k < p ; ++k) {
                if((a[j] >> set_bits[k]) & 1) msk ^= 1 << k ; 
            } 
            sub_mask_cnt[msk] ++ ;  
        }
        
        for(ll j = 0 ; j < p ; ++j) {
            for(ll msk = 0 ; msk < 1 << p ; ++msk) {
                if(!((msk >> j)&1)) 
                    sub_mask_cnt[msk] += sub_mask_cnt[msk ^ (1 << j)] ; 
            }
        }
        // for(int i = 0 ; i < 1 << sz(pos) ; ++i) cout << i << ": " << cnt[i] << nl ;
        // cout << nl ;
        for(ll msk = 0 ; msk < 1 << p ; ++msk) {
            if(sub_mask_cnt[msk] >= (n+1)/2) {
                if(__builtin_popcount(msk) > mx) {
                    mx = __builtin_popcount(msk) ; 
                    ans = 0 ; 
                    for(ll k = 0 ; k < p ; ++k) {
                        if((msk >> k)&1) ans ^= (1ll << set_bits[k]) ; 
                    } 
                }
            } 
        }
        
    }

    deb(ans);
    f(i,0,m) 
    {
        cout<<(ans&1);
        ans>>=1;
    }

}
 
int main() {
    
    {
        Sravani();
    }
    srand(time(0));
    #ifndef ONLINE_JUDGE
       freopen("error.txt", "w", stderr);
    #endif

    // tc()
    solve();
      
    return 0;
}


ll gcd (ll a, ll b)
{
    if(b==0) return a;
    
    return gcd(b,a%b);
}

ll lcm(ll a, ll b)
{
    return (a / gcd(a, b)) * b;
}

bool isPrime(ll n)
{
    if(!(n&1) && n>2) return false;
    for(ll i=3;i*i<=n;i+=2)
    {
        if(n%i == 0) return false;
    }
    return true;
}

bool sortbysec(const pair<int,int> &a, const pair<int,int> &b) 
{ 
    return (a.second > b.second); 
}

void sieve()
{
    // spf[1] = 1;
    // f(i,2,2e5+1) spf[i] = i;
    // f2(i,4,2e5+1) spf[i] = 2;

    // for(ll i=3 ; i*i <= 200000 ; i+=2)
    // {
    //     if(spf[i] == i)
    //     {
    //         for(ll j = i*i; j <= 200000 ; j += i)
    //             spf[j] = i;
    //     }
    // }
}

ll modExp(ll b, ll n)
{
    ll res = 1;
    // cout<<b<<spc<<n<<e;
 
    wl(n > 0)
    {
        if(n&1) res = (res*b)%mod;
 
        n >>= 1;
        b = (b*b)%mod;
    }
 
    return res;
}