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<cstdio>
#include<string>
#include<vector>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<algorithm>
#include<bitset>
#include<ctime>
using namespace std;

// #define NDEBUG
#include<cassert>

#define rep(i, l, r) for(int i=(l), i##_end_=(r); i<=i##_end_; ++i)
#define drep(i, l, r) for(int i=(l), i##_end_=(r); i>=i##_end_; --i)
#define fi first
#define se second
#define mp(a, b) make_pair(a, b)
#define Endl putchar('\n')
#define siz(a) ((a).size())
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
template<class T>inline T fab(T x){ return x<0? -x: x; }
template<class T>inline T readin(T x){
    x=0; int f=0; char c;
    while((c=getchar())<'0' || '9'<c) if(c=='-') f=1;
    for(x=(c^48); '0'<=(c=getchar()) && c<='9'; x=(x<<1)+(x<<3)+(c^48));
    return f? -x: x;
}
template<class T>inline void writc(T x, char s='\n'){
    static int fwri_sta[1005], fwri_ed=0;
    if(x<0) putchar('-'), x=-x;
    do fwri_sta[++fwri_ed]=x%10, x/=10; while(x);
    while(putchar(fwri_sta[fwri_ed--]^48), fwri_ed);
    putchar(s);
}

const int maxn=2e5;
const int maxm=60;
const int maxs=1<<15;
const int maxp=15;

int n, m, p;

int a[maxn+5][maxm+5];

int favor[maxn+5];
int pos[maxn+5], refl[maxn+5], cnt;
int f[maxn+5];
int ans[maxn+5], maxx;
int bitcnt[maxn+5];

inline int Ceil(int x){
    return (x>>1)+(x&1? 1: 0);
}

inline int get(int mod){
    return ((1ll*rand()*rand()%mod)^rand()|rand()&rand())%mod;
}

signed main(){
    srand((unsigned)time(NULL));
    n=readin(1), m=readin(1), p=readin(1);
    rep(i, 1, n) rep(j, 0, m-1) scanf("%1d", &a[i][j]);
    rep(i, 0, maxs) bitcnt[i]=bitcnt[i>>1]+(i&1);
    rep(_, 1, 40){
		int x=get(n)+1;
        // clear & initial
        cnt=0;
        memset(pos, 0, sizeof pos);
        memset(refl, -1, sizeof refl);
        memset(f, 0, sizeof f);
        rep(j, 0, m-1) if(a[x][j]){
            refl[j]=cnt, pos[cnt++]=j;
        }
        favor[x]=(1<<cnt)-1;

        // trans
        rep(i, 1, n) if(i!=x){
            favor[i]=0;
            rep(j, 0, m-1) if(refl[j]!=-1){
                if(a[i][j]) favor[i]^=(1<<refl[j]);
            }
        }

        // initialize
        rep(i, 1, n) ++f[favor[i]];

        // do DP
        rep(i, 1, (1<<cnt)-1){
            for(int j=((i-1)&i); j; --j&=i)
                f[j]+=f[i];
        }

        // enumerate subset & find the maximum
        int mx=0, s=0;
        for(int i=favor[x]; i; --i&=favor[x]) if(f[i]>=Ceil(n)){
            if(mx<bitcnt[i]) mx=bitcnt[i], s=i;
        }
        if(maxx<mx){
            memset(ans, 0, sizeof ans);
            maxx=mx;
            rep(i, 0, cnt) if((s>>i)&1){
                ans[pos[i]]=1;
            }
        }
    }
    rep(i, 0, m-1) printf("%d", ans[i]);
    Endl;
    return 0;
}