#include <iostream>
#include <cmath>
#include <cctype>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <deque>
#include <stack>
#include <unordered_set>
#include <sstream>
#include <cstring>
#include <iomanip>
#include <queue>
#include <unordered_map>
#include <random>
#include <cfloat>
#include <chrono>
#include <bitset>
#include <complex>
#include <immintrin.h>

bool pass(int64_t* arr, int32_t n, int64_t cand) {
	int32_t cnt = 0;
	for(int32_t i = 0 ; i < n; i++)
		if((arr[i] & cand) == cand)
			cnt++;
	return cnt * 2 >= n;
}

int32_t* convolve(int32_t N, int32_t* buf) {
	int32_t* buf2 = new int32_t[1 << N];
	for(int i = 0; i<(1<<N); ++i) {
		buf2[i] = buf[(1 << N) - 1 - i];
	}
	for(int i = 0;i < N; ++i)
		for(int mask = 0; mask < (1<<N); ++mask){
			if(mask & (1<<i))
				buf2[mask] += buf2[mask^(1<<i)];
		}
	int32_t* buf3 = new int32_t[1 << N];
	for(int32_t i = 0; i < (1 << N); i++)
		buf3[i] = buf2[(1 << N) - 1 - i];
	return buf3;
}

int main() {
	std::ios::sync_with_stdio(false);
	std::cin.tie(0);

	int32_t num_tests;
	//std::cin >> num_tests;
	num_tests = 1;

	std::mt19937 rng;
	for(int32_t t = 0; t < num_tests; t++) {
		int32_t n, m, p;
		std::cin >> n >> m >> p;

		int64_t* arr = new int64_t[n];
		for(int32_t i = 0; i < n; i++) {
			std::string str;
			std::cin >> str;

			arr[i] = 0;
			for(int32_t j = 0; j < m; j++) {
				arr[i] |= (1ll << j) * (str[j] - '0');
			}
			/*if(i * 2 < n - 2)
				arr[i] = (1 << p) - 1;
			else
				arr[i] = (1 << (2 * p)) - (1 << p);*/
		}

		int64_t answer = 0;
		for(int32_t j = 0; j < 100; j++) {
			int32_t ind = rng() % n;

			std::vector<int32_t> bits;
			for(int32_t i = 0; i < m; i++)
				if(arr[ind] & (1ll << i))
					bits.push_back(i);

			int32_t* buf = new int32_t[1 << p];
			for(int32_t i = 0; i < (1 << p); i++)
				buf[i] = 0;
			for(int32_t i = 0 ; i < n; i++) {
				int32_t res = 0;
				for(int32_t k = 0; k < bits.size(); k++)
					if(arr[i] & (1ll << bits[k]))
						res += 1 << k;
				buf[res]++;
			}

			buf = convolve(p, buf);

			for(int32_t i = 0; i < (1 << bits.size()); i++) {
				if(buf[i] * 2 >= n) {
					if(__builtin_popcount(i) > __builtin_popcountll(answer)) {
						answer = 0;
						for(int32_t k = 0; k < bits.size(); k++)
							if(i & (1 << k))
								answer |= 1ll << bits[k];
					}
				}
			}
		}
		for(int32_t j = 0; j < m; j++)
			std::cout << (char)('0' + ((answer >> j) & 1));
		std::cout << "\n";
	}
	return 0;
}
