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"
// #include<ext/pb_ds/assoc_container.hpp>
// #include<ext/pb_ds/tree_policy.hpp>


#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
#define foru(i , a , b) for(ll i = (ll)(a) ; i < (ll)(b) ; i++)
#define ford(i , a , b) for(ll i = (ll)(a) ; i >= (ll)(b) ; i--)
#define ain(a , n) for(int i = 0 ; i < (int)n ; i++) cin >> a[i]
#define aout(a , n) for(int i = 0 ; i < (int)n ; i++) cout << a[i] << " "; cend
#define M 1000000007ll
#define mp make_pair
#define Random_Generator(name) mt19937 name(chrono::steady_clock::now().time_since_epoch().count()); 
#define cend cout << "\n"
#define all(x) (x).begin() , (x).end()
#define aout2(a , n , m) for(ll i = 0 ; i < n ; i++){for(ll j = 0 ; j < m ; j++){cout << a[i][j] << " ";} cout << endl;}
#define ain2(a , n , m) for(ll i = 0 ; i < n ; i++){for(ll j = 0 ; j < m ; j++){cin >> a[i][j];}}
#define ff first
#define ss second
#define sz(a) ((long long)(a).size())
#define mset(a , b) memset(a , b , sizeof(a))
#define pb push_back
#define endn '\n'
#define google cout << "Case #" << test_num << ": "
#ifdef PARTH
#define dbg(a) cerr << #a << ": "; _print(a); cerr << endl;
#else
#define dbg(a) // No more TLEs
#endif

using namespace std;
using namespace std::chrono;
//using namespace __gnu_pbds;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef vector <int> vi;
typedef vector <ll> vll;
typedef vector <char> vch;
typedef vector <string> vs;
typedef set <ll> sll;
typedef multiset <ll> msll;
typedef pair <ll , ll> pll;
typedef vector <pair <ll , ll>> vpll;
typedef vector <pair <int, int>> vpi;
//typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;


void _print(ll t){cerr<<t;}
void _print(int t){cerr<<t;}
void _print(string t){cerr<<t;}
void _print(char t){cerr<<t;}
void _print(ld t){cerr<<t;}
void _print(double t){cerr<<t;}
void _print(ull t){cerr<<t;}

template <class T, class V> void _print(pair <T, V> p);
template <class T> void _print(vector <T> v);
template <class T> void _print(set <T> v);
template <class T, class V> void _print(map <T, V> v);
template <class T> void _print(multiset <T> v);
template <class T, class V> void _print(pair <T, V> p){cerr<< "{";_print(p.ff);cerr<<",";_print(p.ss);cerr<<"}";}
template <class T> void _print(vector <T> v){cerr<<"[ ";for(T i: v){_print(i);cerr<<" ";}cerr << "]";}
template <class T> void _print(set <T> v){cerr<<"[ ";for(T i: v){_print(i);cerr<<" ";}cerr << "]";}
template <class T> void _print(multiset <T> v){cerr<<"[ ";for(T i: v){_print(i);cerr<<" ";}cerr << "]";}
//void _print(ordered_set &v){cerr<<"[ ";for(int i: v){_print(i);cerr<<" ";}cerr << "]";}
template <class T, class V> void _print(map <T, V> v){cerr<<"[ ";for(auto i: v){_print(i);cerr<<" ";}cerr << "]";}

/*----------------------------- # --- MATH ALGORITHMS --- # -----------------------------*/

template <class T> T gcd(T a , T b){ while(a != 0){T temp = a; a = b % a; b = temp;}return b;}
template <class T> T egcd(T a , T b , T &x , T &y){T gcd , xt , yt;if(a == 0){gcd = b;x = 0 , y = 1;}else {gcd = egcd(b % a , a , xt , yt);x = yt - (b/a)*xt; y = xt;}return gcd;}
template <class T> T expo(T base , T exp , T mod){T res = 1;base = base % mod;while (exp > 0){if (exp & 1)res = (res*base) % mod;exp = exp>>1;base = (base*base) % mod;}return res;}
template <class T> T modinv(T a , T mod){T x , y; egcd<T>(a , mod , x , y);while(x < 0) x += mod; while(x >= mod) x -= mod; return x;}
template <class T> T modinvfermat(T a , T mod){return expo<T>(a , mod - 2 , mod);}
template <class T> bool rev(T a , T b){return a > b;}
template <class T> ll maxpower(T a , T b){ll ans = 0;while(a > 0 && a % b == 0){ans++;a /= b;}return ans;}
template <class T> T mceil(T a, T b){if(a % b == 0) return a/b; else return a/b + 1;}
template <class T> T lcm(T a, T b){return (a*b)/gcd<T>(a, b);}
const ll infl = 1e18; const int inf = 1e9 + 5;

/*----------------------------- # --- MAIN CODE --- # -----------------------------*/

void test_case(int test_num) {
	int n, m, p;
	cin >> n >> m >> p;
	dbg(n)
	dbg(mp(m, p))
	vector<string> a(n);
	Random_Generator(rng);
	for(int i = 0; i < n; i++) {
		cin >> a[i];
	}
	string res = "";
	int iterations_threshold = 30;
	for(int iterations = 0; iterations < iterations_threshold; iterations++) {
		int current_idx = uniform_int_distribution<int>(0, n - 1)(rng);
		int tm = (int)count(all(a[current_idx]), '1');
		int current_mask = (1 << tm) - 1;
		dbg(current_idx)
		vector<int> temp_mask(n, 0), cnt(1 << tm);
		vector<int> vis(1 << tm);
		for(int i = 0; i < n; i++) {
			int cur = 0;
			for(int j = m - 1; j >= 0; j--) {
				if(a[current_idx][j] == '1') {
					temp_mask[i] += (1 << cur)*(a[i][j] - '0');
					cur++;
				}
			}
			vis[temp_mask[i]]++;
		}
		for(int mask = 0; mask < (1 << tm); mask++) {
			if(vis[mask] == 0) {
				continue;
			}
			int sub_mask = mask;
			cnt[0] += vis[mask];
			while(sub_mask > 0) {
				cnt[sub_mask] += vis[mask];
				sub_mask = (sub_mask - 1)&mask;
			}
		}
		int max_bits = 0;
		int ans_mask = -1;
		for(int mask = 0; mask < (1 << tm); mask++) {
			int cur_bits = __builtin_popcount(mask);
			if(cur_bits >= max_bits and cnt[mask] >= (n + 1)/2) {
				max_bits = cur_bits;
				ans_mask = mask;
			}
		}
		dbg(ans_mask)
		string cur_res = "";
		int cur_bit = 0;
		for(int i = m - 1; i >= 0; i--) {
			if(a[current_idx][i] == '0') {
				cur_res += '0';
			}
			else {
				if((1 << cur_bit)&ans_mask) {
					cur_res += '1';
				}
				else {
					cur_res += '0';
				}
				cur_bit++;
			}
		}
		reverse(all(cur_res));
		dbg(cur_res)
		if(count(all(cur_res), '1') >= count(all(res), '1')) {
			res = cur_res;
		}
	}
	cout << res;
}

int main() {
	ios_base::sync_with_stdio(false); 
	cin.tie(NULL); cout.tie(NULL);
#ifdef PARTH
	FILE* inp = freopen("input.txt", "r", stdin);
	FILE* err = freopen("error.txt", "w", stderr);
	FILE* out = freopen("output.txt", "w", stdout);
#endif
	int _;
	_ = 1;
	// cin >> _;
	auto start = high_resolution_clock::now();
	cout << setprecision(15);
	for(int t = 1; t <= _; t++) {
		test_case(t);
	}
	auto stop = high_resolution_clock::now();
	auto duration = duration_cast<microseconds>(stop - start);
#ifdef PARTH
	cerr << "Time: " << duration.count()/1000.0 << endl;
#endif
	return 0;
}