public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder out = new StringBuilder();
		fillFibo(45);
		int testCases = Integer.parseInt(in.readLine().trim());
		for (int t = 0; t < testCases; t++) {
			int n = Integer.parseInt(in.readLine().trim());
			int prev = -1, p;
			while (n != 0) {
				p = bs(n);
				for (int i = p + 1; prev != -1 && i < prev; i++)
					out.append('0');
				out.append('1');
				n -= fibo[p];
				prev = p;
			}
			for (int i = 1; prev != -1 && i < prev; i++)
				out.append('0');
			out.append('\n');
		}
		System.out.print(out);
	}