/*input
5 5 4
11001
10101
10010
01110
11011
*/
#include <bits/stdc++.h>
#define pb push_back
#define x first
#define y second
#define all(a) a.begin(), a.end()
#define sz(a) (int)a.size()
#define rd() abs((int)rng())
using namespace std;
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
const int maxn = 2e5 + 10;
const int mod = 1e9 + 7;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int n, m, p;
ll arr[maxn];
ll ans;
void go() {
	int idx = rng() % n;
	vector<int>v;
	for (int i = 0; i < m; i++) {
		if (arr[idx] >> i & 1) {
			v.pb(i);
		}
	}

	vector<int>cnt(1 << sz(v));
	for (int i = 0; i < n; i++) {
		int msk = 0;
		for (int j = 0; j < sz(v); j++) {
			if (arr[i] >> v[j] & 1) {
				msk |= 1 << j;
			}
		}
		cnt[msk]++;
	}

	for (int msk = 0; msk < 1 << sz(v); msk++) {
		for (int submsk = (msk - 1) & msk; submsk > 0; submsk = (submsk - 1) & msk) {
			cnt[submsk] += cnt[msk];
		}
	}

	for (int msk = 0; msk < 1 << sz(v); msk++) {
		if (cnt[msk] >= (n + 1) / 2) {
			if (__builtin_popcount(msk) > __builtin_popcountll(ans)) {
				ans = 0;
				for (int bit = 0; bit < sz(v); bit++) {
					if (msk >> bit & 1) {
						ans |= 1ll << v[bit];
					}
				}
			}
		} 
	}
}
int main()
{
	ios_base::sync_with_stdio(false), cin.tie(0);
	cin >> n >> m >> p;
	for (int i = 0; i < n; i++) {
		string s;
		cin >> s;
		for (int j = 0; j < m; j++) {
			if (s[j] == '1') {
				arr[i] |= 1ll << j;
			}
		}
	}

	for (int it = 0; it < 100; it++) {
		go();
	}

	for (int i = 0; i < m; i++) {
		cout << (ans >> i & 1);
	}
	cout << "\n";
	return 0;
}