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:
#include <bits/stdc++.h>
using namespace std;
long double PI = acos(-1);
long double DEL = 1e-10;
int M =  1e9 + 7;
const int N = 3e5 + 10;

#define ftt cin>>tc;for(int cas=1;cas<=tc;++cas)
#define all(a) a.begin(),a.end()
#define vpii vector<pair<int,int> >
#define vvi vector<vector<int> >
#define va(x) vector<array<int,(x)> >
#define pii pair<int,int>
#define vi vector<int>
#define sq(a) ((a)*(a))
#define double long double
#define dbg cout<<"\nhi\n";
#define int long long
#define nl cout<<"\n"
#define sp <<" "<<
#define mid (l+r)/2
#define rson 2*i+1
#define lson 2*i
#define S second
#define F first


template<class T> using minpq = priority_queue<T,vector<T>,greater<T> >;
struct DSU
{
        vi par,size;
        DSU (int n)
        {
                par.resize(n+1);
                size.resize(n+1);
                for(int i=0;i<=n;i++)
                {
                        par[i] = i;
                        size[i] = 1;
                }
        }
        
        int find(int x)
        {
                return par[x] = (x == par[x]? par[x]:find(par[x]));
                
        }
        
        void join(int x,int y)
        {
                int parx = find(x),pary = find(y);
                if(parx == pary)
                {
                        return;
                }
                if(size[parx] > size[pary])
                {
                        size[parx] += size[pary];
                        par[pary] = parx;
                }
                else
                {
                        size[pary] += size[parx];
                        par[parx] = pary;
                }
        }
};

struct DINIC{
        
        struct EDGE{
                int from,to,cap;
                EDGE(int u,int v,int c){
                        from = u;
                        to = v;
                        cap = c;
                }
        };
        
        int s,t,mf,lim;
        vector<int> ptr,lev;
        vector<vector<int>> g;
        vector<EDGE> e;
        
        DINIC(int n,int source,int sink){
                ptr.resize(n+1);
                lev.resize(n+1);
                g.resize(n + 1);
                s = source;
                t = sink;
        }
        
        void AddEdge(int u,int v,int c){
                g[u].push_back(e.size());
                g[v].push_back(e.size() + 1);
                e.push_back({u,v,c});
                e.push_back({v,u,0});
        }
        
        bool bfs(){             // replace bfs() with SPFA if costs are involved
                fill(all(ptr),0);
                fill(all(lev),-1);
                
                lev[s] = 0;
                queue<int> q({s});
                
                while(!q.empty()){
                        int cur = q.front();
                        q.pop();
                        for(auto idx:g[cur]){
                                int nxt = e[idx].to;
                                if(lev[nxt] != -1 or e[idx].cap < lim){
                                        continue;
                                }
                                lev[nxt] = lev[cur] + 1;
                                q.push(nxt);
                        }
                }
                return lev[t] != -1;
        }
        
        int dfs(int i,int f){
                if(i == t or !f){
                        return f;
                }
                for(int &j = ptr[i] ; j < g[i].size(); j++){
                        int idx = g[i][j];
                        
                        if(lev[e[idx].to] != lev[i] + 1){
                                continue;
                        }
                        
                        if(int pushed = dfs(e[idx].to , min(f,e[idx].cap))){
                                e[idx].cap -= pushed;
                                e[idx^1].cap += pushed;
                                return pushed;
                        }
                }
                return 0;
        }
        
        void CalculateMF(){
                mf = 0;
                int inf = 1e9 + 7;    // This should be of order of largest capacity
                // make inf = 1 to disable scalling
                for(lim = inf;lim > 0;lim>>=1){
                        while(bfs()){
                                while(int pushed = dfs(s,inf)){
                                        mf += pushed;
                                }
                        }
                }
        }
};

int fpow(int x, int n)
{
        int res = 1;
        x %= M;
        while(n)
        {
                if(n&1)res = res * x % M;
                x = x * x % M;
                n>>=1;
        }
        return res;
}
int gcd(int a,int b)
{
        if(b == 0)return a;
        return gcd(b,a % b);
}
int lcm(int a,int b)
{
        return a*(b/gcd(a,b));
}
int popcount(int x)
{
        return bitset<65>(x).count();
}

struct COMB{
        vector<int> fac,inv;
        COMB (int n)
        {
                fac.resize(n+1);
                inv.resize(n+1);
                fac[0] = inv[0] = 1;
                for(int i=1;i<=n;i++)
                {
                        fac[i] = fac[i-1]*i % M;
                        inv[i] = fpow(fac[i],M-2);
                }
        }
        int ncr(int n,int r)
        {
                if(r > n){
                        return 0;
                }
                return fac[n] * (inv[r] * inv[n-r] % M) % M;
                return fac[n] * (fpow(fac[r],M-2) * fpow(fac[n-r],M-2) % M ) % M;
        }
};

struct SIEVE{
        vector<int> lp,mob;// gives you largest prime factor and mobius function of a number
        
        SIEVE(int n){
                lp.resize(n+1);
                mob.resize(n+1);
                lp[0] = lp[1] = 1;
                mob[1] = 1;
                for (int i = 2; i <= n; i++) {
                        if (!lp[i]) {
                                for (int j = i; j <= n; j += i){
                                        lp[j] = i;
                                }
                        }
                        int pre = i/lp[i];
                        
                        if(lp[i] == lp[pre]){
                                mob[i] = 0;
                        }
                        else{
                                mob[i] = -mob[pre];
                        }
                }
        }
};

//*********************************** CHECK CONSTRAINTS ***********************************
int cnt, sum, mx, mn, ans, a[N], b[N];
int n, m, d, i, j, k, l, p, q, r, t, w, x, y, z, tc;
string s;


int32_t main()
{
        ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
        #ifndef ONLINE_JUDGE
        freopen("/Users/jenish/XCode/cp/input.txt","r",stdin);
        #endif
        mt19937 gen(chrono::system_clock::now().time_since_epoch().count());
        cin >> n >> m >> p;
        int need = n - n/2;

        for(int i = 1;i <= n;i++){
                cin>>s;
                for(int j = 0;j < m;j++){
                        a[i] += (s[j] - '0') * (1ll<<j);
                }
        }
        for(int it = 1;it <= 50;it++){
                t = a[gen() % n + 1];
                vector<int> onbits;
                for(int j = 0;j < m;j++){
                        if((t>>j)&1){
                                onbits.push_back(j);
                        }
                }
                int likes = onbits.size();
                vector<int> cnt(1ll<<likes);
                for(int i = 1;i<=n;i++){
                        int sel = 0;
                        for(int j = 0;j < likes;j++){
                                if((a[i]>>onbits[j])&1){
                                        sel += (1ll << j);
                                }
                        }
                        cnt[sel]++;
                }
                for(int j = 0;j < likes;j++){
                        for(int mask = 0;mask < (1ll << likes);mask++){
                                if(((mask>>j)&1) == 0){
                                        cnt[mask] += cnt[mask^(1ll<<j)];
                                }
                        }
                }
                for(int mask = 0;mask < (1ll << likes);mask++){
                        if(popcount(mask) > mx and cnt[mask] >= need){
                                //cout<<t sp mask sp cnt[mask] sp need;nl;
                                ans = 0;
                                for(int j = 0;j < likes;j++){
                                        if((mask>>j)&1){
                                                ans += (1ll<<onbits[j]);
                                        }
                                }
                                mx = popcount(mask);
                        }
                }
        }
        
        for(int j = 0;j < m;j++){
                if((ans>>j)&1){
                        cout<<1;
                }
                else{
                        cout<<0;
                }
        }
}