For some binary string $s$ (i.e. each character $s_i$ is either '0' or '1'), all pairs of consecutive (adjacent) characters were written. In other words, all substrings of length $2$ were written. For each pair (substring of length $2$), the number of '1' (ones) in it was calculated.

You are given three numbers:

$n_0$ — the number of such pairs of consecutive characters (substrings) where the number of ones equals $0$;

$n_1$ — the number of such pairs of consecutive characters (substrings) where the number of ones equals $1$;

$n_2$ — the number of such pairs of consecutive characters (substrings) where the number of ones equals $2$.

For example, for the string $s=$"1110011110", the following substrings would be written: "11", "11", "10", "00", "01", "11", "11", "11", "10". Thus, $n_0=1$, $n_1=3$, $n_2=5$.

Your task is to restore any suitable binary string $s$ from the given values $n_0, n_1, n_2$. It is guaranteed that at least one of the numbers $n_0, n_1, n_2$ is greater than $0$. Also, it is guaranteed that a solution exists.


-----Input-----

The first line contains an integer $t$ ($1 \le t \le 1000$) — the number of test cases in the input. Then test cases follow.

Each test case consists of one line which contains three integers $n_0, n_1, n_2$ ($0 \le n_0, n_1, n_2 \le 100$; $n_0 + n_1 + n_2 > 0$). It is guaranteed that the answer for given $n_0, n_1, n_2$ exists.


-----Output-----

Print $t$ lines. Each of the lines should contain a binary string corresponding to a test case. If there are several possible solutions, print any of them.


-----Examples-----

Input
7
1 3 5
1 1 1
3 9 3
0 1 0
3 1 2
0 0 3
2 0 0
Output
1110011110
0011
0110001100101011
10
0000111
1111
000


-----Note-----

None

Source: codeforces | Difficulty: MEDIUM
Tags: Graph traversal

Mathematics

Constructive algorithms


Solutions:
t = int(input())
import collections
for _ in range(t):
	(n0, n1, n2) = list(map(int, input().split()))
	res = []
	if not n1:
		if n0:
			res = ''.join(['0' for _ in range(n0 + 1)])
		else:
			res = ''.join(['1' for _ in range(n2 + 1)])
	else:
		for i in range(n1 + 1):
			if i & 1:
				res.append('0')
			else:
				res.append('1')
		for i in range(n0):
			res.insert(1, '0')
		for i in range(n2):
			res.insert(0, '1')
		res = ''.join(res)
	print(res)


T = int(input())
for _ in range(T):
	(a, b, c) = map(int, input().split(' '))
	ans = []
	for i in range(0, b, 2):
		ans.append(0)
		ans.append(1)
	if len(ans) == 0 and c > 0:
		ans.append(1)
	for i in range(c):
		ans.append(1)
	if b % 2 == 0 and b > 0:
		ans.append(0)
	if len(ans) == 0 and a > 0:
		ans.append(0)
	if len(ans) > 0 and ans[-1] == 0:
		for i in range(a):
			ans.append(0)
	else:
		for i in range(a):
			ans.insert(0, 0)
	for i in ans:
		print(i, end='')
	print('')


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	l = []
	if n1 == 0:
		if n0 == 0:
			for i in range(n2 + 1):
				l.append(1)
		else:
			for i in range(n0 + 1):
				l.append(0)
	else:
		l.append(0)
		for nn0 in range(n0):
			l.append(0)
		l.append(1)
		for nn2 in range(n2):
			l.append(1)
		for nnl in range(n1 - 1):
			if l[-1] == 0:
				l.append(1)
			else:
				l.append(0)
	print(''.join(map(str, l)))


def solution():
	(n0, n1, n2) = map(lambda x: int(x), input().split())
	answer = ''
	if n1 == 0:
		if n0 > 0:
			answer = ''.join(['0'] * (n0 + 1))
		else:
			answer = ''.join(['1'] * (n2 + 1))
	else:
		for i in range(n1 + 1):
			if i % 2 == 0:
				answer = ''.join([answer, '1'])
			else:
				answer = ''.join([answer, '0'])
		answer = ''.join([answer[:1], '0' * n0, answer[1:]])
		answer = ''.join(['1' * n2, answer])
	print(answer)
t = int(input())
for _ in range(t):
	solution()


for s in [*open(0)][1:]:
	(a, b, c) = map(int, s.split())
	print('0'[:1 - b % 2 - (b < 1)] + '10' * ((b - 1) // 2) + '1' * (c + (c + b > 0)) + '0' * (a + (a + b > 0)))


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import ceil, floor, gcd, fabs, factorial, fmod, sqrt, inf, log
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
mod = pow(10, 9) + 7
mod2 = 998244353

def data():
	return sys.stdin.readline().strip()

def out(*var, end='\n'):
	sys.stdout.write(' '.join(map(str, var)) + end)

def l():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]
for _ in range(int(data())):
	(a, b, c) = sp()
	answer = []
	if a:
		for i in range(a + 1):
			answer.append('0')
	if b and (not answer):
		answer.append('0')
	par = 1
	while b:
		if par:
			answer.append('1')
		else:
			answer.append('0')
		par = not par
		b -= 1
	if c:
		if answer and answer[-1] == '1':
			for i in range(c):
				answer.append('1')
		elif answer and answer[-1] == '0':
			answer.pop()
			for i in range(c):
				answer.append('1')
			answer.append('0')
		else:
			for i in range(c + 1):
				answer.append('1')
	out(''.join(answer))


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())

def read():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
mod = 1000000007
import math
import bisect
abc = 'abcdefghijklmnopqrstuvwxyz'

def find(a, x):
	l = 0
	r = len(a) - 1
	while l < r:
		mid = (l + r) // 2
		if a[mid] == x:
			return True
		elif a[mid] > x:
			r = mid - 1
		elif a[mid] < x:
			l = mid + 1
	return False

def main():
	for _ in range(ii()):
		(a, b, c) = mi()
		ans = ''
		if a:
			if c:
				if b % 2:
					for i in range(b):
						if i % 2:
							ans += '1'
						else:
							ans += '0'
				else:
					for i in range(b):
						if i % 2:
							ans += '0'
						else:
							ans += '1'
				ans += a * '0'
				ans += (c + 1) * '1'
			else:
				ans += (a + 1) * '0'
				for i in range(b):
					if i % 2:
						ans += '0'
					else:
						ans += '1'
		else:
			if b % 2:
				for i in range(b):
					if i % 2:
						ans += '1'
					else:
						ans += '0'
			else:
				for i in range(b):
					if i % 2:
						ans += '0'
					else:
						ans += '1'
			ans += (c + 1) * '1'
		print(ans)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import sys, math, cmath, time
from collections import defaultdict
start_time = time.time()
tt = 0

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	return input().strip()

def invr():
	return map(int, input().split())

def solve():
	(a, b, c) = invr()
	if a == 0 and b == 0:
		print('1' * (c + 1))
	elif b == 0 and c == 0:
		print('0' * (a + 1))
	elif a == 0 and c == 0:
		print(''.join(['1'] + [str(i % 2) for i in range(b)]))
	elif b % 2 == 1:
		print(''.join(['0'] * a + [str(i % 2) for i in range(b)] + ['1'] * (c + 1)))
	else:
		print(''.join(['1'] + ['0'] * a + [str(i % 2) for i in range(b - 1)] + ['1'] * (c + 1)))

def main():
	if not ONLINE_JUDGE:
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	t = 1
	t = inp()
	for tt in range(t):
		solve()
	if not ONLINE_JUDGE:
		print('Time Elapsed :', time.time() - start_time, 'seconds')
	sys.stdout.close()

def counter(a):
	q = [0] * max(a)
	for i in range(len(a)):
		q[a[i] - 1] = q[a[i] - 1] + 1
	return q

def string_counter(a):
	q = [0] * 26
	for i in range(len(a)):
		q[ord(a[i]) - 97] = q[ord(a[i]) - 97] + 1
	return q
ONLINE_JUDGE = __debug__
if ONLINE_JUDGE:
	input = sys.stdin.readline
main()


for j in range(int(input())):
	(n, m, k) = map(int, input().split())
	if n == 0 and m == 0:
		print('1' * (k + 1))
	elif m == 0 and k == 0:
		print('0' * (n + 1))
	else:
		print('1' * (k + 1) + '0' * (n + 1) + '10' * ((m - 1) // 2) + '1' * ((m - 1) % 2))


t = int(input())
for _ in range(t):
	(n0, n1, n2) = map(int, input().split(' '))
	if n1 == 0:
		if n0 == 0:
			print(''.join(['1'] * (n2 + 1)))
		else:
			print(''.join(['0'] * (n0 + 1)))
		continue
	mid = '0'
	for i in range(n1):
		if mid[-1] == '0':
			mid += '1'
		else:
			mid += '0'
	pre = '0' * n0
	suf = '1' * n2
	if mid[-1] == '1':
		print(pre + mid + suf)
	else:
		print(pre + mid[:-1] + suf + '0')


for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	if n1 % 2 == 1:
		print('0' * n0 + '01' * (n1 // 2 + 1) + '1' * n2)
	elif n1 == 0 and n2 == 0:
		print('0' * (n0 + 1))
	else:
		print('10' * (n1 // 2) + '0' * n0 + '1' * (n2 + 1))


t = int(input())
for _ in range(t):
	(n0, n1, n2) = map(int, input().split())
	x = sorted([n0, n1, n2])
	if x[1] == 0:
		if not n0 == 0:
			print('0' * (n0 + 1))
		elif not n1 == 0:
			print('10' * ((n1 + 1) // 2) + '1' * ((n1 - 1) % 2))
		else:
			print('1' * (n2 + 1))
	else:
		ans = []
		if n1 % 2 == 0 and n1 > 0:
			ans.append('1')
			n1 -= 1
		ans.append('0' * (n0 + 1))
		ans.append('1')
		n1 -= 1
		ans.append('01' * (n1 // 2))
		ans.append('1' * n2)
		print(''.join(ans))


t = int(input())
for i in range(t):
	(n1, n2, n3) = list(map(int, input().split()))
	if n2 % 2 == 1:
		s = '10'
		a = n2 // 2
		a += 1
		s = s * a
		x = '1' * n3
		y = '0' * n1
		print(x + s + y)
	else:
		s = '10'
		a = n2 // 2
		s = s * a
		x = '1' * n3
		if n2 == 0:
			y = '0' * n1
			if n3 != 0:
				x += '1'
			if n1 != 0:
				y += '0'
		else:
			y = '0' * (n1 + 1)
		print(y + x + s)


chk = lambda x: all((i >= 0 for i in x.values()))

def nexti(st, d):
	lk = st + '0'
	rk = st + '1'
	lkp = lk[-2:]
	if lk[-2:] == '10':
		lkp = '01'
	ld = {**d, lkp: d[lkp] - 1}
	rd = {**d, rk[-2:]: d[rk[-2:]] - 1}
	if chk(ld):
		ls = nexti(lk, ld)
		if ls:
			return lk
	if chk(rd):
		rs = nexti(rk, rd)
		if rs:
			return rk
	return False

def answer(st, d):
	(lk, rk) = (st[-1:] + '0', st[-1:] + '1')
	if lk == '10':
		lk = '01'
	if sum(d.values()) == 0:
		return st[-1]
	value = 1 if len(lk) != 1 else 0
	ld = {**d, lk: d[lk] - value}
	rd = {**d, rk: d[rk] - value}
	if chk(ld):
		lr = answer(st + '0', ld)
		if lr:
			return st[-1] + lr
	if chk(rd):
		rd = answer(st + '1', rd)
		if rd:
			return st[-1] + rd
	return False
for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	d = {'00': a, '01': b, '11': c}
	ans = answer('1', d) or answer('0', d)
	print(ans)


t = int(input())
for _ in range(t):
	(a, b, c) = tuple(map(int, input().split(' ')))
	if b > 0:
		lis = []
		if b % 2 == 1:
			temp = b + 1
			flag = 0
			while temp:
				lis.append(flag)
				temp -= 1
				if flag == 0:
					flag = 1
				else:
					flag = 0
			temp = c
			while temp:
				lis.append(1)
				temp -= 1
			temp = a
			while temp:
				lis.insert(0, 0)
				temp -= 1
			for i in range(len(lis)):
				lis[i] = str(lis[i])
			print(''.join(lis))
		else:
			lis.append(1)
			temp = a
			while temp:
				lis.append(0)
				temp -= 1
			temp = b
			flag = 0
			while temp:
				lis.append(flag)
				temp -= 1
				if flag == 0:
					flag = 1
				else:
					flag = 0
			temp = c
			while temp:
				lis.append(1)
				temp -= 1
			for i in range(len(lis)):
				lis[i] = str(lis[i])
			print(''.join(lis))
	elif a > 0:
		lis = []
		temp = a + 1
		while temp:
			lis.append(0)
			temp -= 1
		for i in range(len(lis)):
			lis[i] = str(lis[i])
		print(''.join(lis))
	elif c > 0:
		lis = []
		temp = c + 1
		while temp:
			lis.append(1)
			temp -= 1
		for i in range(len(lis)):
			lis[i] = str(lis[i])
		print(''.join(lis))


for _ in range(int(input())):
	(n00, n01or10, n11) = map(int, input().split())
	ans = ''
	if n00 != 0 and n01or10 == 0 and (n11 == 0):
		ans += '0' * (n00 + 1)
	elif n11 != 0 and n01or10 == 0 and (n00 == 0):
		ans += '1' * (n11 + 1)
	elif n11 == 0 and n01or10 != 0 and (n00 == 0):
		ans += str('01' * n01or10)[:n01or10 + 1]
	elif n01or10 == 1:
		ans += str(n00 * '0') + '01' + str('1' * n11)
	elif n01or10 % 2 != 0:
		ans += str(n00 * '0') + str('01' * max(n01or10 // 2 + 1, 0)) + str('1' * n11)
	else:
		ans += str(n11 * '1') + str('10' * max(n01or10 // 2, 0)) + str('0' * n00) + '1'
	print(ans)


for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	ans = ''
	if n2 != 0:
		ans += (n2 + 1) * '1'
	if n0 != 0:
		ans += (n0 + 1) * '0'
	if n0 != 0 and n2 != 0:
		n1 -= 1
	if ans == '':
		ans = '0'
	f = 1 ^ int(ans[len(ans) - 1])
	for i in range(n1):
		ans += str(f)
		f = 1 ^ f
	print(ans)


t = int(input())
for _ in range(t):
	(n0, n1, n2) = map(int, input().split())
	if n0 == 0 and n1 == 0:
		print('1' * (n2 + 1))
		continue
	if n2 == 0 and n1 == 0:
		print('0' * (n0 + 1))
		continue
	ans = '0' * (n0 + 1) + '10' * ((n1 - 1) // 2) + '1' * (n2 + 1)
	if n1 % 2 == 0:
		ans += '0'
	print(ans)


t = int(input())
for _ in range(t):
	(a, b, c) = map(int, input().split())
	ans = ''
	if a != 0:
		ans = '0' * (a + 1)
	if c != 0:
		ans += '1' * (c + 1)
	if b != 0:
		if a == 0 and c != 0:
			for i in range(b):
				if i % 2 == 0:
					ans += '0'
				else:
					ans += '1'
		elif a == 0 and c == 0:
			for i in range(b + 1):
				if i % 2 == 0:
					ans += '1'
				else:
					ans += '0'
		elif a != 0 and c == 0:
			for i in range(b):
				if i % 2 == 0:
					ans += '1'
				else:
					ans += '0'
		elif a != 0 and c != 0:
			for i in range(b - 1):
				if i % 2 == 0:
					ans += '0'
				else:
					ans += '1'
	print(ans)


for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	ans = ''
	if b == 0 and c == 0:
		ans = '0' * (a + 1)
	elif b % 2 == 0:
		ans = b // 2 * '10' + a * '0' + (c + 1) * '1'
	else:
		ans = a * '0' + b // 2 * '01' + '0' + (c + 1) * '1'
	print(ans)


a = int(input())
for i in range(a):
	z = list(map(int, input().split()))
	ans = []
	if z[0] == 0 and z[1] == 0:
		ans = []
		for i in range(z[2] + 1):
			ans.append(1)
		print(''.join(map(str, ans)))
		continue
	if z[1] == 0 and z[2] == 0:
		ans = []
		for i in range(z[0] + 1):
			ans.append(0)
		print(''.join(map(str, ans)))
		continue
	if z[0] == 0 and z[2] == 0:
		ans = [1]
		flag = 0
		count = 0
		while count < z[1]:
			if flag == 0:
				ans.append(0)
				count += 1
				flag = 1
				continue
			if flag == 1:
				ans.append(1)
				count += 1
				flag = 0
				continue
		print(''.join(map(str, ans)))
		continue
	if z[0] > 0:
		for i in range(z[0] + 1):
			ans.append(0)
	if z[2] > 0:
		for i in range(z[2] + 1):
			ans.append(1)
	count = 1
	flag = 0
	if z[0] == 0:
		ans.append(0)
		count = 1
		flag = 0
		while count < z[1]:
			if flag == 0:
				ans.append(1)
				count += 1
				flag = 1
				continue
			else:
				ans.append(0)
				count += 1
				flag = 0
				continue
		print(''.join(map(str, ans)))
		continue
	if z[2] == 0:
		ans.append(1)
		count = 1
		flag = 0
		while count < z[1]:
			if flag == 0:
				ans.append(0)
				count += 1
				flag = 1
				continue
			else:
				ans.append(1)
				count += 1
				flag = 0
				continue
		print(''.join(map(str, ans)))
		continue
	while count < z[1]:
		if flag == 0:
			ans.append(0)
			flag = 1
			count += 1
			continue
		if flag == 1:
			ans.append(1)
			flag = 0
			count += 1
			continue
	print(''.join(map(str, ans)))


from sys import stdin
input = stdin.readline
for Ti in range(int(input().strip())):
	(z, o, t) = [int(x) for x in input().strip().split()]
	ans = []
	if z:
		for zi in range(z + 1):
			ans.append(0)
	elif o:
		ans.append(0)
	if o:
		for oi in range(1, o + 1 - (o + 1) % 2):
			ans.append(oi % 2)
	elif t:
		ans.append(1)
	for ti in range(t):
		ans.append(1)
	if o and (o + 1) % 2:
		ans.append(0)
	print(''.join([str(x) for x in ans]))


t = int(input())
for i in range(t):
	ch = input()
	L = [int(i) for i in ch.split()]
	(n0, n1, n2) = (L[0], L[1], L[2])
	s = ''
	if n0 > 0:
		s += '0' * (n0 + 1)
	if n2 > 0:
		s += '1' * (n2 + 1)
	if n0 * n2 > 0:
		n1 -= 1
	if len(s) == 0:
		s = '1'
		x = 0
	else:
		x = int(s[len(s) - 1])
		x = abs(x - 1)
	while n1 > 0:
		s += str(x)
		x = abs(x - 1)
		n1 -= 1
	print(s)


def solve():
	(n0, n1, n2) = [int(x) for x in input().split()]
	s = ''
	if n2 != 0:
		s += '1' * (n2 + 1)
	if n2 == 0 and n1 != 0:
		s += '1'
	chance = 1
	x = n1
	while x > 0:
		if chance % 2 != 0:
			s += '0'
		elif chance % 2 == 0:
			s += '1'
		chance += 1
		x -= 1
	if (n1 == 0 and n2 == 0) and n0 != 0:
		s += '0' * (n0 + 1)
	elif (n1 != 0 or n2 != 0) and n0 != 0:
		if s[-1] == '1':
			s = s[:-1]
			s += '0' * n0
			s += '1'
		else:
			s += '0' * n0
	print(s)
t = int(input())
for i in range(t):
	solve()


for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	if b == 0:
		if c == 0:
			for i in range(a + 1):
				print('0', end='')
		if a == 0:
			for i in range(c + 1):
				print('1', end='')
		print()
		continue
	if b % 2 == 0:
		print('1', end='')
		b -= 1
	for i in range(a + 1):
		print('0', end='')
	for i in range(b // 2):
		print('10', end='')
	print('1', end='')
	for i in range(c):
		print('1', end='')
	print()


t = int(input())
for i in range(t):
	(n0, n1, n2) = map(int, input().split())
	s0 = ''
	s1 = ''
	s2 = ''
	if n0 != 0:
		s0 = '0' * (n0 + 1)
	if n2 != 0:
		s2 = '1' * (n2 + 1)
	if n1 != 0:
		if n0 == 0 and n2 == 0:
			if n1 % 2 == 1:
				s1 = '01' * (n1 // 2 + 1)
			else:
				s1 = '01' * (n1 // 2)
				s1 += '0'
		elif n0 == 0:
			if n1 % 2 == 0:
				s1 = '01' * (n1 // 2)
			else:
				s1 = '01' * (n1 // 2)
				s1 += '0'
		elif n2 == 0:
			if n1 % 2 == 0:
				s1 = '10' * (n1 // 2)
			else:
				s1 = '10' * (n1 // 2)
				s1 += '1'
		elif (n1 - 1) % 2 == 0:
			s1 = '01' * ((n1 - 1) // 2)
		else:
			s1 = '01' * ((n1 - 1) // 2)
			s1 += '0'
	print(s0 + s2 + s1)


def checkEven(n):
	if n % 2 == 0:
		return True
	else:
		return False

def main():
	n = int(input())
	arr = []
	for _ in range(n):
		temp = list(map(int, input().split()))
		arr.append(temp)
	for i in range(n):
		reconstruct(arr[i][0], arr[i][1], arr[i][2])

def reconstruct(n0, n1, n2):
	res = ''
	if n1 == 0:
		if n0 != 0:
			res += '0' * (n0 + 1)
		elif n2 != 0:
			res += '1' * (n2 + 1)
	else:
		if checkEven(n1):
			res += '10' * (n1 // 2)
			res += '1'
		else:
			res += '10' * ((n1 + 1) // 2)
		if n0 != 0:
			res = '1' + '0' * n0 + res[1:]
		if n2 != 0:
			res = '1' * n2 + res
	print(res)
main()


for _ in range(int(input())):
	(a, b, c) = map(int, input().split(' '))
	ans = ''
	dc = 0
	first = True
	for i in range(c):
		if first:
			ans += '11'
			first = False
		else:
			ans += '1'
		dc = 1
	db = 0
	addone = 0
	if b % 2 == 0 and b > 0:
		b -= 1
		addone = 1
	if dc == 1 and b > 0:
		ans += '0'
		b -= 1
	for i in range(b):
		if first:
			ans += '10'
			first = False
		elif ans[len(ans) - 1] == '0':
			ans += '1'
		else:
			ans += '0'
		db = 1
	for i in range(a):
		if first:
			ans += '00'
			first = False
		else:
			ans += '0'
	if addone == 1:
		ans += '1'
	print(ans)


from sys import stdin
a = int(stdin.readline())
for bb in range(0, a):
	c = stdin.readline().split()
	A = int(c[0])
	B = int(c[1])
	C = int(c[2])
	if B == 0:
		if A > 0:
			for k in range(0, A + 1):
				if k == A:
					print(0)
				else:
					print(0, end='')
		if C > 0:
			for k in range(0, C + 1):
				if k == C:
					print(1)
				else:
					print(1, end='')
	if B > 0:
		if A > 0 and C > 0:
			for k in range(0, A + 1):
				print(0, end='')
			for k in range(0, C + 1):
				if B == 1 and k == C:
					print(1)
				else:
					print(1, end='')
			for k in range(0, B - 1):
				if k == B - 2:
					print(k % 2)
				else:
					print(k % 2, end='')
		if A == 0 and C > 0:
			for k in range(0, C + 1):
				print(1, end='')
			for k in range(0, B):
				if k == B - 1:
					print(k % 2)
				else:
					print(k % 2, end='')
		if A > 0 and C == 0:
			for k in range(0, A + 1):
				print(0, end='')
			for k in range(0, B):
				if k == B - 1:
					print((k + 1) % 2)
				else:
					print((k + 1) % 2, end='')
		if A == 0 and C == 0:
			if B % 2 == 0:
				for k in range(0, int(B / 2)):
					print(0, end='')
					print(1, end='')
				print(0)
			if B % 2 == 1:
				for k in range(0, int((B + 1) / 2)):
					print(0, end='')
					if k == int((B - 1) / 2):
						print(1)
					else:
						print(1, end='')


import sys, heapq
from collections import *
from functools import lru_cache
sys.setrecursionlimit(10 ** 6)

def main():
	t = int(input())
	for _ in range(t):
		(n0, n1, n2) = list(map(int, input().split(' ')))
		if n1 == 0:
			res = '0' if n0 > 0 else '1'
		elif n1 == 1:
			res = '01'
		else:
			res = '01' * ((n1 + 1) // 2)
		res = '0' * n0 + res
		if n1 > 1 and n1 % 2 == 0:
			res = '1' + res
		res = res + '1' * n2
		print(res)
main()


t = int(input())
for _ in range(t):
	(a, b, c) = map(int, input().split())
	if not b:
		print('0' * (a + 1) if a else '1' * (c + 1))
	else:
		ans = '10' * ((b + 1) // 2) + '1' * (b + 1 & 1)
		print('1' * c + '1' + '0' * a + '0' + ans[2:])


def count_ns(s):
	count_n00 = 0
	count_n10 = 0
	count_n11 = 0
	for i in range(len(s) - 1):
		substr = s[i:i + 2]
		if substr == '00':
			count_n00 += 1
		elif substr == '11':
			count_n11 += 1
		else:
			assert substr == '01' or substr == '10'
			count_n10 += 1
	return (count_n00, count_n10, count_n11)

def solve(n00, n10, n11):
	if n10:
		res = '1' * n11 + '10' * ((n10 + 1) // 2) + '0' * n00
		if n10 % 2 == 0:
			res = '0' + res
	elif n11:
		assert not n00
		res = '1' * (n11 + 1)
	else:
		assert n00
		res = '0' * (n00 + 1)
	return res

def test():
	import random
	while True:
		s = ''.join(['0' if random.random() < 0.5 else '1' for _ in range(20)])
		print(s)
		solve(*count_ns(s))

def main():
	T = int(input())
	for _ in range(T):
		(n00, n10, n11) = map(int, input().split())
		print(solve(n00, n10, n11))
main()


def func(lst):
	string = ''
	n1 = lst[0]
	n2 = lst[1]
	n3 = lst[2]
	for i in range(n1):
		if len(string) >= 2:
			string += '0'
		else:
			string += '00'
	for i in range(n2):
		if len(string) >= 2:
			if string[len(string) - 1] == '1':
				string += '0'
			else:
				string += '1'
		else:
			string += '01'
	for i in range(n3):
		if len(string) >= 2:
			if '1' in string:
				a = string.find('1')
				string = string[:a] + '1' + string[a:]
			else:
				string += '1'
		else:
			string += '11'
	return string
test_cases = int(input())
output = []
for i in range(test_cases):
	test = input().split()
	lst = [int(i) for i in test]
	output.append(func(lst))
for i in output:
	print(i)


t = int(input())
for i in range(t):
	(a, b, c) = map(int, input().split())
	ans = ''
	if c == 0:
		if b == 0:
			print('0' * (a + 1))
			continue
		elif b % 2 == 0:
			for j in range(b + 1):
				if j % 2 == 0:
					ans += '0'
				else:
					ans += '1'
			if a != 0:
				ans += '0' * a
		else:
			for j in range(b + 1):
				if j % 2 == 0:
					ans += '1'
				else:
					ans += '0'
			if a != 0:
				ans += '0' * a
	else:
		ans += '1' * (c + 1)
		if b % 2 == 0 and b != 0:
			ans = '0' + ans
			k = b - 1
		else:
			k = b
		for j in range(k):
			if j % 2 == 0:
				ans += '0'
			else:
				ans += '1'
		if a != 0:
			ans += '0' * a
	print(ans)


for i1 in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	s = ''
	if n0 == 0 and n1 == 0:
		s = (n2 + 1) * '1'
	elif n1 == 0 and n2 == 0:
		s = (n0 + 1) * '0'
	elif n1 >= 1 and n1 % 2 != 0:
		s = (n0 + 1) * '0' + (n2 + 1) * '1' + (n1 - 1) // 2 * '01'
	elif n1 >= 1 and n1 % 2 == 0:
		s = (n0 + 1) * '0' + (n2 + 1) * '1' + (n1 - 1) // 2 * '01' + '0'
	print(s)


T = int(input())
for t in range(T):
	(a, b, c) = map(int, input().split())
	if b == 0:
		if a != 0:
			s = '0' * (a + 1)
		if c != 0:
			s = '1' * (c + 1)
	else:
		if b % 2 == 1:
			s = '01' * ((b + 1) // 2)
		else:
			s = '1' + '01' * (b // 2)
		f0 = s.index('0')
		s = s[:f0] + '0' * (a + 1) + s[f0 + 1:]
		f1 = s.index('1')
		s = s[:f1] + '1' * (c + 1) + s[f1 + 1:]
	print(s)


for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	if n1 == 0:
		if n0 != 0:
			for i in range(n0 + 1):
				print(0, end='')
		else:
			for i in range(n2 + 1):
				print(1, end='')
		print()
	else:
		s = ''
		s += '1' * (n2 + 1)
		s += '0' * (n0 + 1)
		for i in range(n1 - 1):
			if i % 2 == 0:
				s += '1'
			else:
				s += '0'
		print(s)


import sys, re, math
from collections import deque, defaultdict, Counter, OrderedDict
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from heapq import heappush, heappop, heapify, nlargest, nsmallest

def STR():
	return list(input())

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST():
	return list(map(int, input().split()))

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def sortListWithIndex(listOfTuples, idx):
	return sorted(listOfTuples, key=lambda x: x[idx])

def sortDictWithVal(passedDic):
	temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0]))[::-1]
	toret = {}
	for tup in temp:
		toret[tup[0]] = tup[1]
	return toret

def sortDictWithKey(passedDic):
	return dict(OrderedDict(sorted(passedDic.items())))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7
t = INT()
while t != 0:
	(n0, n1, n2) = MAP()
	l0 = l1 = []
	if n0 != 0:
		l0 = ['0'] * (n0 + 1)
	if n2 != 0:
		l1 = ['1'] * (n2 + 1)
	if n0 == n2 == 0:
		temp = n1 + 1
		l01 = ['01'] * (temp // 2)
		if temp % 2 != 0:
			l01.append('0')
	elif n0 == 0:
		if n1 == 0:
			l01 = []
		else:
			k = n1
			if k % 2 == 0:
				l01 = ['01'] * (k // 2)
			else:
				l01 = ['01'] * (k // 2)
				l01.append('0')
	elif n2 == 0:
		if n1 == 0:
			l01 = []
		else:
			k = n1
			if k % 2 == 0:
				l01 = ['10'] * (k // 2)
			else:
				l01 = ['10'] * (k // 2)
				l01.append('1')
	elif n1 == 0:
		l01 = []
	else:
		k = n1 - 1
		if k % 2 == 0:
			l01 = ['01'] * (k // 2)
		else:
			l01 = ['01'] * (k // 2)
			l01.append('0')
	str1 = ''.join(l0) + ''.join(l1) + ''.join(l01)
	print(str1)
	t -= 1


def main():
	(n0, n1, n2) = map(int, input().split())
	if not n1:
		if n0:
			print('0' * (n0 + 1))
		else:
			print('1' * (n2 + 1))
		return
	res = '1'
	next_s = 0
	for _ in range(n1):
		res += str(next_s)
		next_s = int(not bool(next_s))
	if not n1 % 2:
		res = res[:-1]
	res += '0' * n0
	res = '1' * n2 + res
	if not n1 % 2:
		res += '1'
	print(res)
for _ in range(int(input())):
	main()


t = int(input())
while t > 0:
	t -= 1
	(c, b, a) = list(map(int, input().split(' ')))
	s = ''
	if a > 0:
		for i in range(a + 1):
			s += '1'
	elif b != 0:
		s += '1'
	else:
		s += '0'
	zero = 1
	for i in range(b):
		if zero == 1:
			if c > 0:
				s += '0'
				while c != 0:
					s += '0'
					c -= 1
			else:
				s += '0'
		else:
			s += '1'
		zero *= -1
	for i in range(c):
		s += '0'
	print(s)


for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	if b == 0:
		if a:
			print('0' * (a + 1))
		else:
			print('1' * (c + 1))
		continue
	s = ''
	s += '0' * (a + 1)
	s += '1' * (c + 1)
	d = 0
	n = b - 1
	while n > 0:
		s += str(d)
		d = (d + 1) % 2
		n -= 1
	print(s)


for _ in range(int(input())):
	(p1, p2, p3) = map(int, input().split())
	ans = ''
	if p1 > 0:
		ans += '0' * (p1 + 1)
	elif p2 > 0:
		ans += '0'
	if p2 > 0:
		ans += '1'
		p2 -= 1
		ans += '01' * (p2 // 2)
		p2 = p2 % 2
	elif p3 > 0:
		ans += '1'
	if p3 > 0:
		ans += '1' * p3
	if p2 > 0:
		ans += '0'
	print(ans)


t = int(input())
for i in range(t):
	inp = input().split(' ')
	n0 = int(inp[0])
	n1 = int(inp[1])
	n2 = int(inp[2])
	ans = ''
	if n1 % 2 == 0 and n0 > 0 and (n2 > 0):
		ans += '1'
		n1 -= 1
	if n1 > 0 and n0 == 0 and (n2 == 0):
		ans += '1'
		for j in range(n1):
			if j % 2:
				ans += '1'
			else:
				ans += '0'
		print(ans)
		continue
	if n1 > 0 and n1 % 2 == 0:
		if n0 > 0:
			ans += '0'
			for j in range(n0):
				ans += '0'
			ans += '1'
			for j in range(n1 - 1):
				if j % 2:
					ans += '1'
				else:
					ans += '0'
		else:
			ans += '1'
			for j in range(n2):
				ans += '1'
			ans += '0'
			for j in range(n1 - 1):
				if j % 2:
					ans += '0'
				else:
					ans += '1'
	elif n1 > 0:
		if n0 > 0:
			ans += '0'
			for j in range(n0):
				ans += '0'
			ans += '1'
			for j in range(n1 - 1):
				if j % 2:
					ans += '1'
				else:
					ans += '0'
			for j in range(n2):
				ans += '1'
		else:
			ans += '0'
			for j in range(n1):
				if j % 2:
					ans += '0'
				else:
					ans += '1'
			for j in range(n2):
				ans += '1'
	elif n0 > 0:
		for j in range(n0 + 1):
			ans += '0'
	else:
		for j in range(n2 + 1):
			ans += '1'
	print(ans)


t = int(input())
for y in range(t):
	(n0, n1, n2) = map(int, input().split())
	s = ''
	if n1 or n2:
		s += '1' * (n2 + 1)
	if n1:
		s += '01' * ((n1 - 1) // 2)
	if n1 or n0:
		s += '0'
	s += '0' * n0
	if n1 % 2 == 0 and n1 > 0:
		s = '0' + s
	print(s)


from collections import deque
t = int(input())
for _ in range(t):
	(n_0, n_1, n_2) = map(int, input().split())
	s = ''
	if n_0:
		for i in range(n_0 + 1):
			s += '0'
	if n_2:
		for i in range(n_2 + 1):
			s += '1'
	bit = 0
	if n_0 == 0 and n_2 == 0:
		s += '01'
	elif n_0 == 0:
		n_1 += 1
	elif n_2 == 0:
		n_1 += 1
		bit = 1
	for i in range(n_1 - 1):
		s += str(bit)
		bit = bit ^ 1
	print(s)


t = int(input())
while t > 0:
	(a, b, c) = [int(x) for x in input().split()]
	s = ''
	if b == 0:
		cc = '1'
		ccc = c + 1
		if a != 0:
			cc = '0'
			ccc = a + 1
		print(cc * ccc)
	else:
		if (b + 1) % 2 == 0:
			s += '1' * c
			aa = 1
			for _ in range(b + 1):
				s += str(aa)
				aa = 1 - aa
			s += '0' * a
		else:
			s += '1' * c
			aa = 1
			for _ in range(b):
				s += str(aa)
				aa = 1 - aa
			s += '0' * a
			s += '1'
		print(s)
	t -= 1


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	l1 = []
	l3 = []
	if x:
		l1 = [0] * (x + 1)
	if z:
		l3 = [1] * (z + 1)
	l1.extend(l3)
	if x and z:
		y -= 1
	if x == 0 and z == 0:
		l1.append(0)
		l1.append(1)
		y -= 1
	while y:
		p = int(l1[-1]) ^ 1
		l1.append(p)
		y -= 1
	for i in l1:
		print(i, end='')
	print()


for yu in range(int(input())):
	(a, b, c) = map(int, input().split())
	s = ''
	for j in range(a):
		if j == 0:
			s += '00'
		else:
			s += '0'
	for j in range(b):
		if s == '':
			s += '10'
		elif s[-1] == '1':
			s += '0'
		else:
			s += '1'
	if s == '':
		s += '1' * (c + 1)
	elif s[-1] == '1':
		s += '1' * c
	else:
		s = s[:-1]
		s += '1' * c
		s += '0'
	print(s)


t = int(input())
for _ in range(t):
	(n0, n1, n2) = map(int, input().split())
	if n1 > 0:
		out = '0' * (n0 + 1) + '1' * (n2 + 1)
		n1 -= 1
		out += '01' * (n1 // 2)
		if n1 % 2:
			out += '0'
		print(out)
	elif n0 > 0:
		print('0' * (n0 + 1))
	else:
		print('1' * (n2 + 1))


n = int(input())
for i in range(n):
	(z, oz, o) = [int(x) for x in input().split()]
	if o == 0:
		if oz % 2 == 0:
			print('01' * int(oz / 2) + '0' + '0' * z)
		else:
			print('10' * int((oz + 1) / 2) + '0' * z)
	elif z == 0:
		if oz % 2 == 0:
			print('10' * int(oz / 2) + '1' + '1' * o)
		else:
			print('01' * int((oz + 1) / 2) + '1' * o)
	elif oz % 2 == 0:
		print('01' * int(oz / 2) + '1' * o + '0' * (z + 1))
	else:
		print('10' * int((oz - 1) / 2) + '1' + '1' * o + '0' * (z + 1))


from sys import stdout, stdin
for _ in range(int(stdin.readline())):
	(n0, n1, n2) = map(int, stdin.readline().split())
	if not n1:
		if n0:
			stdout.write('0' * (n0 + 1))
		elif n2:
			stdout.write('1' * (n2 + 1))
	else:
		stdout.write('0' * (n0 + 1))
		stdout.write('1' * (n2 + 1))
		n1 -= 1
		n2 = 0
		while n1 > 0:
			stdout.write(str(n2))
			n1 -= 1
			n2 = 1 - n2
	stdout.write('\n')


for i in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	r = ''
	if n1 == 0:
		if n0 == 0:
			print('1' * (n2 + 1))
		elif n1 == 0:
			print('0' * (n0 + 1))
		else:
			print('0' * (n0 + 1) + '1' * (n2 + 1))
	elif n0 == 0 and n2 == 0:
		for j in range(n1 + 1):
			if j % 2 == 0:
				r += '1'
			else:
				r += '0'
		print(r)
	else:
		for j in range(n1 + 1):
			if j % 2 == 0:
				r += '1'
			else:
				r += '0'
		a = list(r)
		a.insert(1, '0' * n0)
		a.insert(0, '1' * n2)
		print(''.join(a))


from collections import deque

def solve(n0, n1, n2):
	if n1 == 0:
		return '1' * (n2 + 1) if n2 > 0 else '0' * (n0 + 1)
	q = deque()
	q.append('1')
	q.appendleft('0')
	n1 -= 1
	while n0 > 0:
		q.appendleft('0')
		n0 -= 1
	while n2 > 0:
		q.append('1')
		n2 -= 1
	digits = ['1', '0']
	current = 0
	while n1 > 0:
		q.appendleft(digits[current])
		current = 1 - current
		n1 -= 1
	return ''.join(q)
T = int(input())
for case in range(T):
	print(solve(*[int(x) for x in input().split()]))


t = int(input())
for i in range(t):
	(n1, n2, n3) = map(int, input().split())
	l = []
	for j in range(n1):
		l.append(0)
	if len(l) != 0:
		l.append(0)
	alt = 1
	if n2 != 0 and len(l) == 0:
		l.append(0)
	for j in range(n2):
		l.append(alt)
		alt = 1 - alt
	if len(l) == 0 and n3 != 0:
		l.append(1)
	if l[-1] == 1:
		for j in range(n3):
			l.append(1)
		print(''.join(map(str, l)))
	else:
		l.pop(-1)
		for j in range(n3):
			l.append(1)
		l.append(0)
		print(''.join(map(str, l)))


t = int(input())
for _ in range(t):
	(a0, a1, a2) = list(map(int, input().strip().split()))
	if a0 != 0:
		for i in range(a0 + 1):
			print(0, end='')
	if a2 != 0:
		for i in range(a2 + 1):
			print(1, end='')
	if a1 != 0:
		if a0 == 0 and a2 == 0:
			temp = 0
			for i in range(a1 + 1):
				print(temp % 2, end='')
				temp += 1
		elif a0 == 0 and a2 != 0:
			temp = 0
			for i in range(a1):
				print(temp % 2, end='')
				temp += 1
		elif a0 != 0 and a2 == 0:
			temp = 1
			for i in range(a1):
				print(temp % 2, end='')
				temp += 1
		else:
			temp = 0
			for i in range(a1 - 1):
				print(temp % 2, end='')
				temp += 1
	print()


import sys
import math
from collections import deque
input = sys.stdin.buffer.readline
for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	s = ''
	if n2 > 0 and n0 > 0:
		s += (n2 + 1) * '1'
		s += (n0 + 1) * '0'
		for i in range(n1 - 1):
			if i % 2 == 0:
				s += '1'
			else:
				s += '0'
	elif n2 > 0:
		s += (n2 + 1) * '1'
		for i in range(n1):
			if i % 2 == 0:
				s += '0'
			else:
				s += '1'
	elif n0 > 0:
		s += (n0 + 1) * '0'
		for i in range(n1):
			if i % 2 == 0:
				s += '1'
			else:
				s += '0'
	else:
		s += '10'
		for i in range(n1 - 1):
			if i % 2 == 0:
				s += '1'
			else:
				s += '0'
	print(s)


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(n0, n1, n2) = list(map(int, input().split()))
	ans = []
	if n0 > 0 and n2 > 0:
		for i in range(n0 + 1):
			ans.append('0')
		for i in range(n2 + 1):
			ans.append('1')
		n1 -= 1
		current = False
		for i in range(n1):
			if current:
				ans.append('1')
			else:
				ans.append('0')
			current = not current
	elif n0 != 0 or n2 != 0:
		if n0 == 0:
			for i in range(n2 + 1):
				ans.append('1')
			current = False
			for i in range(n1):
				if current:
					ans.append('1')
				else:
					ans.append('0')
				current = not current
		else:
			for i in range(n0 + 1):
				ans.append('0')
			current = True
			for i in range(n1):
				if current:
					ans.append('1')
				else:
					ans.append('0')
				current = not current
	else:
		ans.append('0')
		current = True
		for i in range(n1):
			if current:
				ans.append('1')
			else:
				ans.append('0')
			current = not current
	ans = ''.join(ans)
	print(ans)


for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	a = []
	if n1 == 0:
		if n0 == 0:
			for i in range(n2 + 1):
				a.append('1')
		elif n2 == 0:
			for i in range(n0 + 1):
				a.append('0')
	elif n1 % 2 == 1:
		a.append('0' * (n0 + 1))
		a.append('10' * (n1 // 2))
		a.append('1' * (n2 + 1))
	else:
		a.append('0' * n0)
		a.append('01' * (n1 // 2))
		a.append('1' * n2)
		a.append('0')
	print(''.join(a))


t = int(input())
for i in range(t):
	ans = ''
	(n0, n1, n2) = map(int, input().split())
	if n1 != 0:
		ans += '1' * (n2 + 1) + '0' * (n0 + 1)
		n1 -= 1
	elif n0 != 0:
		ans += '0' * (n0 + 1)
	elif n2 != 0:
		ans += '1' * (n2 + 1)
	for j in range(0, n1):
		if j % 2 == 0:
			ans += '1'
		else:
			ans += '0'
	print(ans)


for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	t = '1' * (c + 1)
	j = '0' * (a + 1)
	if b == 0:
		if a == 0:
			print('1' * (c + 1))
		elif c == 0:
			print('0' * (a + 1))
		else:
			print(t + j)
		continue
	p = t + j
	if b % 2 == 0:
		if b == 2:
			p += '1'
		else:
			p += '10' * (b // 2 - 1)
			p += '1'
	elif b == 1:
		pass
	else:
		p += '10' * (b // 2)
	print(p)


t = int(input())
for i in range(t):
	(a, b, c) = [int(x) for x in input().split()]
	ans = ''
	if c != 0:
		ans = (c + 1) * '1'
	if b != 0:
		if ans:
			ans += '0'
			if b % 2 == 0:
				ans = '0' + ans
			ans += '10' * ((b - 1) // 2)
		elif b > 1:
			ans = '10' * ((b + 1) // 2)
			if b % 2 == 0:
				ans = '0' + ans
		else:
			ans = '10'
	if a != 0:
		if ans:
			ans += a * '0'
		else:
			ans = (a + 1) * '0'
	print(ans)


t = int(input())
for i in range(t):
	(n0, n1, n2) = map(int, input().split())
	orin1 = n1
	n1s = ''
	n0s = ''
	n2s = ''
	if n1 > 0:
		n1s += '1'
		n1s += '0'
		n1 -= 1
		if n1 > 0:
			flag = 0
			for j in range(n1):
				if flag == 0:
					n1s += '1'
					flag = 1
				elif flag == 1:
					n1s += '0'
					flag = 0
	if n2 > 0:
		if orin1 == 0:
			n2s += '1'
			n2s += '1'
			n2 -= 1
		if n2 > 0:
			for j in range(n2):
				n2s += '1'
	if n0 > 0:
		if orin1 == 0:
			n0s += '0'
			n0s += '0'
			n0 -= 1
		if n0 > 0:
			for j in range(n0):
				n0s += '0'
	n1s = list(n1s)
	n1s.insert(1, n0s)
	n1s.insert(0, n2s)
	print(''.join(n1s))


import os
import sys
from math import *
from collections import *
from bisect import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
for _ in range(Int()):
	(n0, n1, n2) = value()
	ans = []
	if n1 >= 2:
		for i in range(n1):
			ans.append(i % 2)
	fi = 1
	se = 0
	if ans == []:
		if ans == []:
			ans = [0, 1]
		if n1 == 0:
			if n2:
				ans = [1]
			else:
				ans = [0]
		ans = [0] * n0 + ans + [1] * n2
	elif ans[-1] == 0:
		for i in range(n0):
			ans.append(0)
		for i in range(n2 + 1):
			ans.append(1)
	else:
		for i in range(n2):
			ans.append(1)
		for i in range(n0 + 1):
			ans.append(0)
	print(*ans, sep='')


for _ in range(int(input())):
	(n0, n1, n2) = [int(i) for i in input().split()]
	if n2 == n1 == 0:
		result = (n0 + 1) * '0'
	elif n1 % 2 == 0:
		result = n1 // 2 * '10' + n0 * '0' + (n2 + 1) * '1'
	else:
		result = n0 * '0' + n1 // 2 * '01' + '0' + (n2 + 1) * '1'
	print(result)


t = int(input())
for __ in range(t):
	(n0, n2, n1) = map(int, input().split())
	if n2 == 0:
		if n0 > 0:
			ret = '0' * (n0 + 1)
		else:
			ret = '1' * (n1 + 1)
	else:
		ret = '0' * (n0 + 1) + '1' * (n1 + 1)
		n2 -= 1
		last = 0
		while n2 > 0:
			ret += str(last)
			last ^= 1
			n2 -= 1
	print(ret)


k = int(input())
for k0 in range(k):
	(n1, n2, n3) = map(int, input().split())
	s = '01' * ((n2 + 1) // 2)
	if n2 % 2 == 0 and n2 != 0:
		s += '0'
	k1 = s.find('1')
	if s == '' and n3 > 0:
		s = '1'
	s = s[:k1] + '1' * n3 + s[k1:]
	k1 = s.find('0')
	if s == '' and n1 > 0:
		s = '0'
	s = s[:k1] + '0' * n1 + s[k1:]
	print(s)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def RL():
	return map(int, sys.stdin.readline().rstrip().split())

def RLL():
	return list(map(int, sys.stdin.readline().rstrip().split()))

def N():
	return int(input())

def comb(n, m):
	return factorial(n) / (factorial(m) * factorial(n - m)) if n >= m else 0

def perm(n, m):
	return factorial(n) // factorial(n - m) if n >= m else 0

def mdis(x1, y1, x2, y2):
	return abs(x1 - x2) + abs(y1 - y2)

def toord(c):
	return ord(c) - ord('a')

def lcm(a, b):
	return a * b // lcm(a, b)
mod = 998244353
INF = float('inf')
from math import factorial, sqrt, ceil, floor, gcd
from collections import Counter, defaultdict, deque
from heapq import heapify, heappop, heappush

def main():
	for _ in range(N()):
		(a, b, c) = RL()
		res = '0' * (a + 1)
		now = 1
		for i in range(b):
			res += str(now)
			now ^= 1
		if c > 0:
			if res[-1] == '0':
				res = res[:-1] + '1' * c + res[-1]
			else:
				res += '1' * c
		print((c + 1) * '1' if a == 0 and b == 0 else res)
main()


import sys
sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep='\n')

def II():
	return int(sys.stdin.readline())

def MI():
	return map(int, sys.stdin.readline().split())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI(rows_number):
	return [LI() for _ in range(rows_number)]

def SI():
	return sys.stdin.readline()[:-1]

def main():
	for _ in range(II()):
		(n0, n1, n2) = MI()
		if n1 == 1:
			ans = '0' * (n0 + 1) + '1' * (n2 + 1)
		elif n1 == n2 == 0:
			ans = '0' * (n0 + 1)
		elif n0 == n2 == 0:
			ans = '0'
			for i in range(n1):
				ans += '0' if i % 2 else '1'
		elif n0 == n1 == 0:
			ans = '1' * (n2 + 1)
		elif n0 == 0:
			ans = '1' * (n2 + 1)
			for i in range(n1):
				ans += '1' if i % 2 else '0'
		elif n2 == 0:
			ans = '0' * (n0 + 1)
			for i in range(n1):
				ans += '0' if i % 2 else '1'
		else:
			ans = '0' * (n0 + 1) + '1' * (n2 + 1)
			for i in range(n1 - 1):
				ans += '1' if i % 2 else '0'
		print(ans)
main()


t = input()
for i in range(int(t)):
	(n0, n1, n2) = map(int, input().split(' '))
	if n1 % 2 == 1:
		s = '10' * (n1 // 2 + 1)
		s = '1' * n2 + s
		s += '0' * n0
	else:
		s = '10' * (n1 // 2)
		if n1 > 0:
			s += '0' * n0
			s += '1'
			s = '1' * n2 + s
		elif n0 > 0:
			s += '0' * (n0 + 1)
		else:
			s = '1' * (n2 + 1) + s
	print(s)


import sys
for _ in range(int(sys.stdin.readline())):
	(a, b, c) = map(int, sys.stdin.readline().split())
	string = ''
	if a > 0:
		for _ in range(a + 1):
			string += '0'
	if b > 0 and a == 0:
		string += '0'
	for i in range(b):
		n = 1 - i % 2
		string += str(n)
	if c > 0:
		if b == 0:
			c += 1
		if b > 0 and b % 2 == 0:
			string = string[:-1]
			for _ in range(c):
				string += '1'
			string += '0'
		else:
			for _ in range(c):
				string += '1'
	print(string)


import sys
input = lambda : sys.stdin.readline().strip('\r\n')
for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	if n1 == 0:
		if n0 != 0:
			print('0' * (n0 + 1))
		else:
			print('1' * (n2 + 1))
	else:
		pattern = '10' * 2 * n1
		string = pattern[:n1 + 1]
		print('1' * n2 + string[:1] + '0' * n0 + string[1:])


t = int(input())
for _ in range(t):
	(a, b, c) = map(int, input().split())
	if a > 0:
		for _ in range(a + 1):
			print('0', end='')
	if b % 2 == 1:
		if a == 0:
			print('0', end='')
		for _ in range(b // 2):
			print('10', end='')
		if c == 0:
			print('1', end='')
	else:
		if a == 0 and b > 0:
			print('0', end='')
		for _ in range((b - 1) // 2):
			print('10', end='')
		if c == 0 and b > 0:
			print('1', end='')
	if c > 0:
		for _ in range(c + 1):
			print('1', end='')
	if b % 2 == 0 and b > 0:
		print('0', end='')
	print('')


t = int(input())
i = 0
while i < t:
	(a, b, c) = map(int, input().split())
	if a == 0 and b == 0 and (c == 0):
		print('')
	elif a != 0 and b == 0 and (c == 0):
		print('0' * (a + 1))
	elif a == 0 and b == 0 and (c != 0):
		print('1' * (c + 1))
	else:
		s0 = ''
		s1 = '0' * (a + 1)
		n = b
		s2 = '1'
		n = n - 1
		s = '1' * c
		s2 = s2 + s
		z = '1'
		while n > 0:
			if z == '1':
				s0 = z + s0
				z = '0'
				n = n - 1
			elif z == '0':
				s0 = z + s0
				z = '1'
				n = n - 1
		print(s0 + s1 + s2)
	i = i + 1


def Output(n):
	if n[1] == 0:
		ones = '1' * (n[2] + 1) if n[2] > 0 else ''
		zeros = '0' * (n[0] + 1) if n[0] > 0 else ''
		return ones + zeros
	one_zero = '01' * (n[1] // 2) + '0' * (n[1] % 2)
	if one_zero[-1] == '0':
		ones = '1' * (n[2] + 1) if n[2] > 0 else '1'
		zeros = '0' * n[0] if n[1] > 0 else ''
		return one_zero + zeros + ones
	ones = ones = '1' * n[2] if n[2] > 0 else ''
	zeros = '0' * (n[0] + 1) if n[1] > 0 else '0'
	return one_zero + ones + zeros
m = int(input())
for i in range(m):
	n = list(map(int, input().split()))
	print(Output(n))


for t in range(int(input())):
	(n, m, p) = map(int, input().split())
	arr = ''
	for i in range(n + 1):
		arr += '0'
	no = 1
	for i in range(m):
		arr += str(no)
		no ^= 1
	if p > 0:
		buf = ''
		if arr[-1] == '0':
			buf = '0'
			arr = arr[:len(arr) - 1]
		if len(arr) == 0:
			for i in range(p + 1):
				arr += '1'
		else:
			for i in range(p):
				arr += '1'
		if m > 0:
			arr += buf
	print(arr)


t = int(input())
while t > 0:
	(n1, n2, n3) = map(int, input().split())
	s2 = ''
	if n1 != 0 and n2 == 0 and (n3 == 0):
		s2 += '0' * (n1 + 1)
	if n2 != 0 and n3 != 0:
		s2 += '0' * (n1 + 1)
		s2 += '1' * (n3 + 1)
		n2 -= 1
		while n2 > 1:
			s2 += '01'
			n2 -= 2
		if n2 == 1:
			s2 += '0'
	elif n2 != 0 and n3 == 0:
		s2 += '0' * (n1 + 1)
		s2 += '1'
		n2 -= 1
		while n2 > 1:
			s2 += '01'
			n2 -= 2
		if n2 == 1:
			s2 += '0'
	elif n2 == 0 and n3 != 0 and (n1 == 0):
		s2 += '1' * (n3 + 1)
	print(s2)
	t -= 1


t = int(input())
for i in range(t):
	(n0, n1, n2) = [int(i) for i in input().split()]
	if n0 == 0 and n1 == 0:
		print('1' * (n2 + 1))
	elif n1 == 0 and n2 == 0:
		print('0' * (n0 + 1))
	elif n0 == 0 and n2 == 0:
		x = '01' * ((n1 + 1) // 2)
		if n1 % 2 == 0:
			x += '0'
		print(x)
	elif n0 == 0:
		x = '10' * (n1 // 2)
		if n1 % 2 == 1:
			x = '0' + x
		print(x + '1' * (n2 + 1))
	elif n2 == 0:
		x = '01' * ((n1 + 1) // 2)
		if n1 % 2 == 0:
			x = x + '0'
		print('0' * n0 + x)
	else:
		x = '0' * n0 + '01' * ((n1 + 1) // 2) + '1' * n2
		if n1 % 2 != 0:
			print(x)
		else:
			print('1' + x)


t = int(input())
for r in range(t):
	(na, nb, nc) = map(int, input().split())
	List = []
	if na > 0:
		List.extend(['0' for x in range(na + 1)])
	if nc > 0:
		List.extend(['1' for y in range(nc + 1)])
	if nb > 0:
		if len(List) == 0 or List[len(List) - 1] != '1':
			List.extend('1')
		if len(List) > max(na + 1, nc + 1):
			nb -= 1
		List.extend(['01' for x in range(nb // 2)])
		if nb % 2 != 0:
			List.append('0')
	print(''.join(List))


t = int(input())
for i in range(t):
	(a, b, c) = map(int, input().split())
	if c != 0:
		s1 = '1' * (c + 1)
	else:
		s1 = ''
	if b != 0:
		if b % 2 == 0:
			s2 = '01' * ((b + 1) // 2)
			s2 += '0'
			s4 = '10' * ((b + 1) // 2)
			s4 += '1'
		else:
			s2 = '01' * ((b + 1) // 2)
			s4 = '10' * ((b + 1) // 2)
	else:
		s2 = ''
	if a != 0:
		s3 = '0' * (a + 1)
	else:
		s3 = ''
	s = s3 + s1
	if c != 0:
		if a != 0:
			s2 = s2[:len(s2) - 2]
		else:
			s2 = s2[:len(s2) - 1]
		s += s2
	else:
		if a != 0 and b != 0:
			s4 = s4[:len(s4) - 1]
		elif a != 0 and b == 0:
			s4 = ''
		s += s4
	print(s)


for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	ans = []
	if c != 0:
		ans += ['1'] * (c + 1)
		ans += ['0', '1'] * (b // 2)
		if b % 2:
			ans.append('0')
			ans += ['0'] * a
		else:
			if b > 0:
				ans.pop()
				ans = ['0'] + ans
			if a >= 1:
				ans += ['0'] * a
		print(''.join(ans))
	elif b == 0:
		print('0' * (a + 1))
	else:
		if b > 2:
			ans.append('1')
			ans += ['0', '1'] * (b // 2)
			if b % 2:
				ans.append('0')
				ans += ['0'] * a
			else:
				ans.pop()
				ans = ['0'] + ans
				if a >= 1:
					ans += ['0'] * a
		elif b == 1:
			ans += ['1', '0']
			ans += ['0'] * a
		else:
			ans += ['0', '1', '0']
			if a > 0:
				ans += ['0'] * a
		print(''.join(ans))


t = int(input())
for i in range(t):
	(n0, n1, n2) = list(map(int, input().split()))
	if n1 == 0:
		if n2 == 0:
			print('0' * (n0 + 1))
		else:
			print('1' * (n2 + 1))
	else:
		if (n1 + 1) % 2 == 0:
			ans = '10' * ((n1 + 1) // 2)
		else:
			ans = '10' * (n1 // 2) + '1'
		print(n2 * '1' + '1' + '0' * n0 + ans[1:])


def funct1(a, b, c):
	s = ''
	p = ''
	q = ''
	if a == 0:
		while b >= 2:
			q += '01'
			b -= 2
		if b == 1:
			q += '0'
	if a != 0:
		for i in range(a + 1):
			p += '0'
		b -= 1
		while b >= 2:
			q += '10'
			b -= 2
		if b == 1:
			q += '1'
	if c != 0:
		for i in range(c + 1):
			s += '1'
	print(s + p + q)

def funct2(a, b, c):
	s = ''
	p = ''
	q = ''
	if a == 0 and c == 0:
		q = '1'
		while b >= 2:
			q += '01'
			b -= 2
		if b == 1:
			q += '0'
	if a == 0 and c != 0:
		while b >= 2:
			q += '10'
			b -= 2
		if b == 1:
			q += '1'
	if a != 0:
		for i in range(a + 1):
			p += '1'
		b -= 1
		while b >= 2:
			q += '01'
			b -= 2
		if b == 1:
			q += '0'
	if c != 0:
		for i in range(c + 1):
			s += '0'
	print(s + p + q)
for i in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	if n0 < n2:
		funct1(n0, n1, n2)
	else:
		funct2(n2, n1, n0)


n = int(input())
for i in range(n):
	nums = list(map(int, input().split()))
	if nums[1] > 0:
		s = '1'
		for j in range(nums[1]):
			if j % 2 == 1:
				s += '1'
			else:
				s += '0'
	elif nums[0] > 0:
		s = '0'
	else:
		s = '1'
	s = '1' * nums[2] + s
	s = s[:nums[2] + 1] + '0' * nums[0] + s[nums[2] + 1:]
	print(s)


import sys
import math as mt

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def printwsp(*args):
	return print(*args, end='')

def printsp(*args):
	return print(*args, end=' ')

def printchk(*args):
	return print(*args, end='tst, ')
MOD = int(1000000000.0 + 7)
BABYMOD = 998244353
for _testcases_ in range(int(input())):
	(n0, n1, n2) = get_ints()
	boo1 = False
	boo2 = False
	prev = -1
	if n2 != 0:
		prev = 1
		boo1 = True
		for i in range(n2 + 1):
			printwsp('1')
	if n0 != 0:
		prev = 0
		boo2 = True
		for i in range(n0 + 1):
			printwsp('0')
	boo3 = False
	if n0 == 0 and n2 == 0:
		boo3 = True
		for i in range(n1 + 1):
			if i % 2:
				printwsp('1')
			else:
				printwsp('0')
	if boo3 == False:
		if boo1 and boo2:
			n1 -= 1
		if prev == 1:
			for i in range(n1):
				if i % 2:
					printwsp('1')
				else:
					printwsp('0')
		elif prev == 0:
			for i in range(n1):
				if i % 2:
					printwsp('0')
				else:
					printwsp('1')
	print()


for _ in range(int(input())):
	(a, b, c) = [int(s) for s in input().split()]
	ans = ''
	if b % 2 != 0:
		ans = a * '0' + (b + 1) // 2 * '01' + c * '1'
	elif b != 0:
		ans = (c + 1) * '1' + a * '0' + b // 2 * '01'
	elif a == 0:
		ans = '1' * (c + 1)
	else:
		ans = '0' * (a + 1)
	print(ans)


INT_MAX = 10 ** 30 + 7
MOD = 10 ** 9 + 7

def INPUT():
	return list((int(i) for i in input().split()))

def LIST_1D_ARRAY(n):
	return [0 for _ in range(n)]

def LIST_2D_ARRAY(m, n):
	return [[-1 for _ in range(n)] for _ in range(m)]
for i in range(int(input())):
	(x, y, z) = INPUT()
	if y == 0:
		if x == 0:
			print('1' * (z + 1))
		else:
			print('0' * (x + 1))
	else:
		ans = ''
		ans += (x + 1) * '0'
		ans += (z + 1) * '1'
		if y > 1:
			for i in range(y - 1):
				if i & 1:
					ans += '1'
				else:
					ans += '0'
		print(ans)


def reconstruct(n0, n1, n2):
	s0 = ''
	s1 = ''
	s2 = ''
	if n0 != 0:
		s0 += '0' * (n0 + 1)
	if n1 != 0:
		a = n1
		if n1 % 2 == 0:
			a -= 1
		s1 += '01' * ((a + 1) // 2)
	if n2 != 0:
		s2 += '1' * (n2 + 1)
	ans = ''
	if n1 == 0 and n0 == 0:
		ans += s2
	elif n0 == 0 and n1 != 0:
		ans += s1 + s2[1:]
	else:
		ans += s0 + s1[1:] + s2[1:]
	if n1 % 2 == 0 and n1 != 0:
		ans += '0'
	return ans
T = int(input())
for i in range(T):
	(n0, n1, n2) = [int(j) for j in input().split()]
	print(reconstruct(n0, n1, n2))


t = int(input())
for i in range(t):
	(n0, n1, n2) = [int(x) for x in input().split()]
	if n1 == 0:
		if n0 != 0:
			print('0' * (n0 + 1))
		else:
			print('1' * (n2 + 1))
	else:
		s = ''
		for i in range(n1 + 1):
			if i % 2 == 0:
				s += '1'
			else:
				s += '0'
		print(n2 * '1' + s[:1] + n0 * '0' + s[1:])


T = int(input())
while T > 0:
	(a, b, c) = [int(x) for x in input().split()]
	x = '0' * a
	y = '1' * c
	if b == 0:
		if a > 0:
			print(x + '0')
		else:
			print(y + '1')
	elif b % 2 == 1:
		print(x + '01' * ((b + 1) // 2) + y)
	else:
		print(x + '01' + y + '0' + '10' * ((b - 1) // 2))
	T -= 1


for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	ans = []
	if b >= 1:
		for i in range(b + 1):
			if i % 2 == 0:
				ans.append('1')
			else:
				ans.append('0')
	pre = []
	if b == 0:
		if a > 0:
			for i in range(a + 1):
				ans.append('0')
		if c > 0:
			for i in range(c + 1):
				ans.append('1')
	else:
		if a > 0:
			if ans[-1] == '0':
				for i in range(a):
					ans.append('0')
			else:
				ans.pop()
				for i in range(a):
					ans.append('0')
				ans.append('1')
		if c > 0:
			for i in range(c):
				pre.append('1')
	print(''.join(pre), end='')
	print(''.join(ans))


def readInt():
	return int(input())

def readList():
	return list(map(int, input().rstrip().split()))

def readString():
	s = input()
	return s

def readInts():
	return map(int, input().rstrip().split())

def solve(a, b, c):
	r = ''
	if a > 0:
		a = a + 1
	if c > 0:
		c = c + 1
	for i in range(c):
		r += '1'
	for i in range(a):
		r += '0'
	if a > 0 and c > 0:
		b = b - 1
	if not len(r):
		r = '1'
	add1 = False
	if r[-1] == '0':
		add1 = True
	while b > 0:
		if add1:
			r += '1'
		else:
			r += '0'
		add1 = not add1
		b -= 1
	print(r)
t = readInt()
for i in range(t):
	(a, b, c) = readInts()
	solve(a, b, c)


def r(t=int):
	return list(map(t, input().split()))

def ri(t=int):
	return t(input())

def cd(it):
	ret_val = dict()
	for v in it:
		ret_val[v] = ret_val.get(v, 0) + 1
	return ret_val
for h in range(ri()):
	(n00, n01, n11) = r()
	s = ''
	if n00:
		s += '0' * (n00 + 1)
	if n01:
		if s:
			s += '1'
		else:
			s += '01'
		n01 -= 1
	if n11:
		if not s:
			s += '1'
		s += '1' * n11
	for c in range(n01):
		s += str(c % 2)
	print(s)


def solve(s):
	if s[1] == 0:
		no = None
		c = None
		if s[0] > 0:
			no = '0'
			c = s[0]
		else:
			no = '1'
			c = s[2]
		return no * (c + 1)
	ans = '0' * (s[0] + 1) + '1' * (s[2] + 1)
	if s[1] == 1:
		return ans
	elif (s[1] - 1) % 2 == 0:
		return ans + '01' * ((s[1] - 1) // 2)
	else:
		return ans + '01' * ((s[1] - 2) // 2) + '0'
n = int(input())
for i in range(n):
	s = list(map(int, input().split()))
	print(solve(s))


t = int(input())
for i in range(t):
	(n0, n1, n2) = input().split()
	(n0, n1, n2) = (int(n0), int(n1), int(n2))
	string = ''
	if n1 == 0 and n2 == 0:
		string += '0'
		for i in range(n0):
			string += '0'
	else:
		string += '1'
		for i in range(n2):
			string += '1'
		add = '1'
		if n0 != 0:
			string += '0'
			n1 -= 1
			for i in range(n0):
				string += '0'
			for i in range(n1):
				string += add
				if add == '1':
					add = '0'
				else:
					add = '1'
		elif n0 == 0 and n1 != 0:
			string += '0'
			n1 -= 1
			for i in range(n1):
				string += add
				if add == '1':
					add = '0'
				else:
					add = '1'
	print(string)


for __ in range(int(input())):
	(n1, n2, n3) = map(int, input().split())
	ans = ''
	if n1 > 0:
		ans += '0' * (n1 + 1)
	if n2 > 0:
		if n1 == 0:
			if n2 % 2 == 0:
				ans += '1' + '01' * (n2 // 2)
			else:
				ans += '01' * ((n2 + 1) // 2)
		elif n2 % 2 == 0:
			ans = '1' + ans + '1' + '01' * (n2 // 2 - 1)
		else:
			ans += '1' + '01' * ((n2 + 1) // 2 - 1)
	if n3 > 0:
		if n2 == 0:
			ans = '1' * (n3 + 1)
		else:
			ans += '1' * n3
	print(ans)


from sys import stdin
input = iter(stdin.readlines()).__next__
t = int(input())
for _ in range(t):
	(n0, n1, n2) = map(int, input().split())
	if n1 > 0 and n1 % 2 == 1:
		s = ['1'] * (n2 + 1)
		s += ['01'] * (n1 // 2)
		s += ['0'] * (n0 + 1)
	elif n1 > 0 and n1 % 2 == 0:
		s = ['0'] + ['1'] * (n2 + 1)
		s += ['01'] * ((n1 - 1) // 2)
		s += ['0'] * (n0 + 1)
	else:
		s = ['1'] * (n2 + 1) if n0 == 0 else ['0'] * (n0 + 1)
	print(''.join(s))


import sys, math
input = sys.stdin.readline

def getInts():
	return [int(s) for s in input().split()]

def getInt():
	return int(input())

def getStrs():
	return [s for s in input().split()]

def getStr():
	return input()

def listStr():
	return list(input())
import collections as col
import math

def solve():
	(N0, N1, N2) = getInts()
	targ_len = N0 + N1 + N2
	ans = []
	if N0 and (not N2):
		ans += [0] * (N0 + 1)
		while N1 > 1:
			ans.insert(1, 1)
			ans.insert(1, 0)
			N1 -= 2
		if N1:
			ans.append(1)
		ans = map(str, ans)
		return ''.join(ans)
	if N2 and (not N0):
		ans += [1] * (N2 + 1)
		while N1 > 1:
			ans.insert(1, 0)
			ans.insert(1, 1)
			N1 -= 2
		if N1:
			ans.append(0)
		ans = map(str, ans)
		return ''.join(ans)
	if N0 and N2:
		ans = [0] * (N0 + 1) + [1] * (N2 + 1)
		N1 -= 1
		while N1 > 1:
			ans.insert(1, 1)
			ans.insert(1, 0)
			N1 -= 2
		if N1:
			ans.append(0)
		ans = map(str, ans)
		return ''.join(ans)
	if N1 % 2 == 0:
		ans = [1, 0] * (N1 // 2) + [1]
	else:
		ans = [1, 0] * ((N1 + 1) // 2)
	ans = map(str, ans)
	return ''.join(ans)
for t in range(getInt()):
	print(solve())


def fF(a, b, c):
	s = ''
	if b != 0 or c != 0:
		s = '1'
	else:
		s = '0'
	for i in range(b):
		if i % 2 == 0:
			s += '0'
		else:
			s += '1'
	for j in range(len(s)):
		if s[j] == '0':
			s = s[:j] + '0' * a + s[j:]
			break
	for j in range(len(s)):
		if s[j] == '1':
			s = s[:j] + '1' * c + s[j:]
			break
	print(s)
n = int(input())
for i in range(n):
	l = list(map(int, input().split()))
	fF(l[0], l[1], l[2])


import sys
input = sys.stdin.readline
t = int(input())
for tests in range(t):
	(n0, n1, n2) = map(int, input().split())
	if n0 == n1 == 0:
		print(''.join(['1'] * (n2 + 1)))
	elif n1 == n2 == 0:
		print(''.join(['0'] * (n0 + 1)))
	elif n0 == n2 == 0:
		ANS = ['1']
		for i in range(n1):
			ANS.append(str(i % 2))
		print(''.join(ANS))
	elif n1 % 2 == 1:
		ANS = ['0'] * n0
		for i in range(n1):
			ANS.append(str(i % 2))
		ANS += ['1'] * (n2 + 1)
		print(''.join(ANS))
	else:
		ANS = ['1'] + ['0'] * n0
		for i in range(n1 - 1):
			ANS.append(str(i % 2))
		ANS += ['1'] * (n2 + 1)
		print(''.join(ANS))


for w in range(int(input())):
	(n0, n1, n2) = tuple(map(int, input().split()))
	(x0, x1, x2) = (n0, n1, n2)
	s = ''
	if n0 > 0:
		s += '0' * (n0 + 1)
	if n2 > 0:
		s += '1' * (n2 + 1)
	if n0 > 0 and n2 > 0:
		x1 -= 1
	t = 0
	if s != '' and s[-1] == '0':
		t = 1
	if n0 == 0 and n2 == 0:
		x1 += 1
	while x1 > 0:
		if t == 0:
			s += '0'
			x1 -= 1
			t = 1
		else:
			s += '1'
			x1 -= 1
			t = 0
	print(s)


t = int(input())
for _ in range(t):
	(n0, n1, n2) = map(int, input().split())
	if n0 != 0 and n1 == 0 and (n2 == 0):
		print('0' * (n0 + 1))
	elif n0 == 0 and n1 == 0 and (n2 != 0):
		print('1' * (n2 + 1))
	else:
		s = ''
		for i in range(n1 + n1 % 2):
			s += str(i % 2)
		s = '0' * n0 + s + '1' * n2
		if n1 % 2 == 0:
			s += '0'
		print(s)


import math
import bisect
T = int(input())
for t in range(T):
	(a, b, c) = map(int, input().split())
	if b == 0:
		if a == 0:
			out = '1' * (c + 1)
		else:
			out = '0' * (a + 1)
	else:
		out = ''
		if a > 0:
			out += (a + 1) * '0'
		if b >= 1:
			if a == 0:
				out += '0'
			out = '1' + out
			out = '1' * c + out
			b -= 1
		d = b // 2
		out += '10' * d
		if b % 2 == 1:
			out += '1'
	print(out)


from collections import defaultdict as dc
from collections import Counter
from heapq import *
import math
from bisect import bisect_left, bisect
import sys
from collections import deque as dq
from heapq import heapify, heappush, heappop
mod = 10 ** 9 + 7

def sinp():
	p = str(input())
	return p

def inp():
	p = int(input())
	return p

def line():
	p = list(map(int, input().split()))
	return p

def read_mat():
	n = inp()
	a = []
	for i in range(n):
		a.append(line())
	return a

def digit(n):
	s = str(n)
	p = 0
	for i in s:
		p += int(i) ** 2
	return p

def check(s):
	(x, y, z) = (0, 0, 0)
	for i in range(len(s) - 1):
		p = s[i] + s[i + 1]
		if p == '11':
			z += 1
		elif p == '00':
			x += 1
		else:
			y += 1
	return (x, y, z)

def solve(a, b, c):
	if a == 0 and b == 0:
		return '0' * (c + 1)
	if a == 0 and c == 0:
		z = b // 2 + 1
		p = '01' * z
		if b % 2 == 0:
			return p[:-1]
		return p
	if b == 0 and c == 0:
		return '1' * (a + 1)
	if a == 0:
		p = '0' * c
		z = b // 2 + 1
		p += '01' * z
		if b % 2 == 0:
			return p[:-1]
		return p
	if c == 0:
		p = '1' * a
		z = b // 2 + 1
		p += '10' * z
		if b % 2 == 0:
			return p[:-1]
		return p
	p = ''
	p = '1' * (a + 1)
	p = p + '0' * c
	if a != 0 and c != 0:
		b = b - 1
	z = b // 2 + 1
	p += '01' * z
	if b % 2 == 0:
		return p[:-1]
	return p
for test in range(inp()):
	(a, b, c) = line()
	l = solve(c, b, a)
	print(l)


for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	if n1 == 0 and n0 == 0:
		for t in range(n2 + 1):
			print(1, end='')
		print()
		continue
	l = [0 for t in range(n0 + 1)]
	c = 0
	for i in range(n1):
		c ^= 1
		l.append(c)
	p = 1
	if l[-1] == 0:
		p = 0
		l.pop()
	for i in range(n2):
		l.append(1)
	if p == 0:
		l.append(0)
	print(*l, sep='')


for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	ans = []
	if n1 == 0:
		if n0 != 0:
			for i in range(n0 + 1):
				ans.append(0)
		else:
			for i in range(n2 + 1):
				ans.append(1)
	else:
		for i in range(n1 + 1):
			if i % 2 == 0:
				ans.append(1)
			else:
				ans.append(0)
		for i in range(n0):
			ans.insert(1, 0)
		for j in range(n2):
			ans.insert(0, 1)
	print(''.join((str(x) for x in ans)))


def f(n0, n1, n2):
	str1 = ''
	if n1 == 0:
		if n0 == 0:
			str1 += '1' * (n2 + 1)
			return str1
		else:
			str1 += '0' * (n0 + 1)
			return str1
	else:
		str1 += '01' * ((n1 + 1) // 2)
		str1 = '0' * n0 + str1
		str1 += '1' * n2
		if n1 % 2 == 0:
			str1 += '0'
		return str1
t = int(input())
cnt = 0
while cnt < t:
	cnt += 1
	(n0, n1, n2) = [int(i) for i in input().split()]
	res = ''
	res = f(n0, n1, n2)
	print(res)


import sys
input = sys.stdin.readline
from collections import deque
inf = 100000000000000000
mod = 998244353
for CASES in range(int(input())):
	ANS = deque()
	(a, b, c) = map(int, input().split())
	if b == 0:
		if a > 0:
			print('0' * (max(a, c) + 1))
		else:
			print('1' * (max(a, c) + 1))
		continue
	one = zero = (b + 1) // 2
	for i in range(b + 1):
		ANS.append(i % 2)
	for i in range(c):
		ANS.insert(1, 1)
	for i in range(a):
		ANS.appendleft(0)
	sys.stdout.write(''.join(map(str, ANS)) + '\n')


T = int(input())
for _ in range(T):
	(a, b, c) = map(int, input().split(' '))
	ans = []
	for i in range(a):
		ans.append(0)
	for i in range(0, b, 2):
		ans.append(0)
		ans.append(1)
	for i in range(c):
		ans.append(1)
	if b > 0:
		if b % 2 == 0:
			ans.append(0)
	elif c == 0:
		ans.append(0)
	else:
		ans.append(1)
	for i in ans:
		print(i, end='')
	print('')


testy = int(input(''))
wyniki = []

def ciag(parametry):
	naszciag = ''
	a = parametry[2]
	b = parametry[1]
	c = parametry[0]
	if parametry[1] != 0:
		naszciag += '1'
		while a > 0:
			naszciag += '1'
			a -= 1
		naszciag += '0'
		b -= 1
		while c > 0:
			naszciag += '0'
			c -= 1
		while b > 0:
			if naszciag[len(naszciag) - 1] == '0':
				naszciag += '1'
			else:
				naszciag += '0'
			b -= 1
	elif a > 0:
		for i in range(0, a + 1):
			naszciag += '1'
	else:
		for i in range(0, c + 1):
			naszciag += '0'
	return naszciag
for i in range(0, testy):
	wejscie = input('')
	parametry = wejscie.split()
	parametry = list(map(int, parametry))
	wyniki.append(ciag(parametry))
for wynik in wyniki:
	print(wynik)


t = int(input())
for _ in range(t):
	(zero, one, two) = map(int, input().split())
	s = []
	if one != 0 or two > 0:
		s.append('1')
	for i in range(two):
		s.append('1')
	if zero > 0 or one > 0:
		for i in range(zero + 1):
			s.append('0')
	if one > 0:
		one -= 1
	A = ['1', '0']
	for i in range(one // 2):
		s += A
	if one % 2 == 1 and one > 0:
		s.append('1')
	print(''.join(s))


t = int(input())
for _ in range(t):
	(n0, n1, n2) = map(int, input().split())
	if n0 == 0 and n1 == 0:
		S = '1' * (n2 + 1)
	elif n0 == 0 and n2 == 0:
		S = '0'
		for i in range(n1):
			S = S[:] + '1' * (i % 2 == 0) + '0' * (i % 2 == 1)
	elif n1 == 0 and n2 == 0:
		S = '0' * (n0 + 1)
	elif n2 == 0 and n1 != 0 and (n0 != 0):
		S = '0' * (n0 + 1)
		for i in range(n1):
			S = S[:] + '1' * (i % 2 == 0) + '0' * (i % 2 == 1)
	else:
		S = '0'
		if n1 > 0 and n1 % 2 == 0:
			S = '10'
			n1 -= 1
		for i in range(n0):
			S = S[:] + '0'
		for i in range(n1 // 2):
			S = S[:] + '10'
		if n2 != 0:
			for i in range(n2 + 1):
				S = S[:] + '1'
	print(S)


for _ in range(int(input())):
	n = [*map(int, input().split())]
	jg = ''
	if n[0] != 0:
		jg += '0' * (n[0] + 1)
	if n[2] != 0:
		jg += '1' * (n[2] + 1)
	if n[0] > 0 and n[2] > 0:
		n[1] -= 1
	if len(jg) == 0:
		jg += '0'
	for i in range(n[1]):
		jg += str((int(jg[-1]) + 1) % 2)
	print(jg)


for _ in range(int(input())):
	(n1, n2, n3) = map(int, input().split())
	ans = '0' * (n1 + 1)
	if n1 == 0 and n2 == 0:
		ans = ''
	if n3 != 0 or n2 != 0:
		ans += '1' * (n3 + 1)
	n2 -= 1
	while n2 > 0:
		if ans[-1] == '1':
			ans += '0'
		else:
			ans += '1'
		n2 -= 1
	print(ans)


for _ in range(int(input())):
	data = (*map(int, input().split()),)
	(n0, n1, n2) = (data[0], data[1], data[2])
	my_string = ''
	if n1 == 0:
		if n0 > 0 and n2 == 0:
			my_string = '0' * (n0 + 1)
		elif n2 != 0:
			my_string = '1' * (n2 + 1)
		else:
			my_string = ''
	else:
		mystring_n1 = '10' * (n1 // 2 + n1 % 2)
		if not n1 % 2:
			mystring_n1 += '1'
		if n0 > 0:
			mystring_n1 = mystring_n1[0] + '0' * n0 + mystring_n1[1:]
		if n2 > 0:
			mystring_n1 = '1' * n2 + mystring_n1
		my_string = mystring_n1
	print(my_string)


for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	if n1 == 0 and n0 == 0:
		s = '1' * (n2 + 1)
		print(s)
		continue
	elif n1 == 0 and n2 == 0:
		s = '0' * (n0 + 1)
		print(s)
		continue
	s = ''
	c = '1'
	while len(s) != n1 + 1:
		s += c
		if c == '0':
			c = '1'
		else:
			c = '0'
	s = '1' * n2 + s
	ind = s.index('0')
	s = s[:ind + 1] + '0' * n0 + s[ind + 1:]
	print(s)


def solution(n1, n2, n3):
	pair = False
	if n2 % 2 == 0 and n2 != 0:
		pair = True
		n2 -= 1
	temp = (n2 + 1) // 2
	zero = True if n2 == 0 else False
	print('1' * (n3 + (1 if zero and n3 else 0)) + '10' * temp + '0' * (n1 + (1 if zero and n1 else 0)) + ('1' if pair else ''))
t = int(input())
for i in range(1, t + 1):
	(n1, n2, n3) = map(int, input().split(' '))
	solution(n1, n2, n3)


t = int(input())
import math

def solve(a, b, c):
	tree = {}

	def dfs(s, aa, bb, cc):
		if (aa, bb, cc) == (a, b, c):
			return s
		for d in ['0', '1']:
			k = s + d
			if len(k) > 1:
				if k[-2:] == '00':
					if aa + 1 > a:
						pass
					else:
						x = dfs(k, aa + 1, bb, cc)
						if x:
							return x
				elif k[-2:] == '11':
					if cc + 1 > c:
						pass
					else:
						x = dfs(k, aa, bb, cc + 1)
						if x:
							return x
				elif bb + 1 > b:
					pass
				else:
					x = dfs(k, aa, bb + 1, cc)
					if x:
						return x
			else:
				x = dfs(k, aa, bb, cc)
				if x:
					return x
	return dfs('', 0, 0, 0)
for _ in range(t):
	(a, b, c) = [int(x) for x in input().strip().split()]
	print(solve(a, b, c))


from sys import stdin
for _ in range(int(stdin.readline())):
	(n0, nx, n1) = map(int, stdin.readline().split())
	if nx == 0:
		if n0 > 0:
			r = (n0 + 1) * '0'
		else:
			r = (n1 + 1) * '1'
	elif nx // 2 == nx / 2:
		r = n0 * '0' + nx // 2 * '01' + n1 * '1' + '0'
	else:
		r = n0 * '0' + (nx + 1) // 2 * '01' + n1 * '1'
	print(r)


t = int(input())
for w in range(t):
	ns = list(map(int, input().strip().split()))
	n0 = ns[0]
	n1 = ns[1]
	n2 = ns[2]
	if n1 == 0 and n0 != 0 and (n2 != 0):
		l = [-1]
	elif n1 == 0 and n0 != 0:
		l = [0] * (n0 + 1)
	elif n1 == 0 and n2 != 0:
		l = [1] * (n2 + 1)
	elif n1 == 0:
		l = [0]
	else:
		l = [0] * (n0 + 1) + [1] * (n2 + 1)
		s = 0
		for i in range(n1 - 1):
			l.append(s)
			s = abs(1 - s)
	q = ''
	for j in l:
		q += str(j)
	print(q)


t = int(input())
for i in range(t):
	(a, b, c) = map(int, input().split())
	if b == 0:
		if a == 0:
			print('1' * (c + 1))
		else:
			print('0' * (a + 1))
	elif a == 0 and c == 0:
		print('01' * ((b + 1) // 2) + '0' * ((b + 1) % 2))
	elif a == 0:
		print('1' * c + '10' * ((b + 1) // 2) + '1' * ((b + 1) % 2))
	elif c == 0:
		print('0' * a + '01' * ((b + 1) // 2) + '0' * ((b + 1) % 2))
	else:
		print('0' * (a + 1) + '1' * (c + 1) + '01' * ((b - 1) // 2) + '0' * ((b - 1) % 2))


for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	if n1 == 0:
		if n0 == 0:
			print('1' * (n2 + 1))
		else:
			print('0' * (n0 + 1))
		continue
	ans = []
	for _ in range(n2 + 1):
		ans.append('1')
	for _ in range(n0 + 1):
		ans.append('0')
	n1 -= 1
	while True:
		if n1 == 0:
			break
		if ans[-1] == '0':
			ans.append('1')
		else:
			ans.append('0')
		n1 -= 1
	print(''.join(ans))


t = int(input())
while t > 0:
	t -= 1
	(n0, n1, n2) = map(int, input().split())
	a = '0' * (n0 + 1)
	b = '1' * (n2 + 1)
	ans = ''
	if n0 == 0 and n2 == 0:
		ans = '01'
		for i in range(n1 - 1):
			if i % 2 == 0:
				ans += '0'
			else:
				ans += '1'
	elif n0 == 0:
		ans = b
		for i in range(n1):
			if i % 2 == 0:
				ans += '0'
			else:
				ans += '1'
	elif n2 == 0:
		ans = a
		for i in range(n1):
			if i % 2 == 0:
				ans += '1'
			else:
				ans += '0'
	else:
		ans = a + b
		for i in range(n1 - 1):
			if i % 2 == 0:
				ans += '0'
			else:
				ans += '1'
	print(ans)


t = int(input())
for _ in range(t):
	(a, b, c) = map(int, input().split())
	R = []
	if c:
		R += [1] * (c + 1)
	if a:
		R += [0] * (a + 1)
	R = R or [0]
	if a and c:
		b -= 1
	while b > 0:
		R.append(1 - R[-1])
		b -= 1
	print(*R, sep='')


for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	ans = []
	if a and c:
		b -= 1
	while c > 0:
		if len(ans) == 0:
			ans.extend([1, 1])
		else:
			ans.append(1)
		c -= 1
	while a > 0:
		if len(ans) == 0 or ans[-1] == 1:
			ans.extend([0, 0])
		else:
			ans.append(0)
		a -= 1
	while b > 0:
		if len(ans) == 0:
			ans.extend([0, 1])
		else:
			ans.append(1 if ans[-1] == 0 else 0)
		b -= 1
	print(*ans, sep='')


for t in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	if n1 == 0:
		if n0 > 0 and n2 == 0:
			print('0' * (n0 + 1))
		elif n0 == 0 and n2 > 0:
			print('1' * (n2 + 1))
		else:
			assert False
	else:
		print(''.join(['0' * (n0 + 1), '1' * (n2 + 1)] + [str(i & 1) for i in range(n1 - 1)]))


for i in range(int(input())):
	(n0, n1, n2) = (int(n) for n in input().split(' '))
	str_len = n0 + n1 + n2 + 1
	if n1 == 0:
		print(n0 > 0 and ''.join(['0' for e in range(n0 + 1)]) or ''.join(['1' for e in range(n2 + 1)]))
	else:
		res = '1'
		for i in range(n1):
			if res[len(res) - 1] == '1':
				res += '0'
			else:
				res += '1'
		res = ''.join(['1' for i in range(n2)]) + res[:1] + ''.join(['0' for i in range(n0)]) + res[1:]
		print(res)


def to_list(s):
	return list(map(lambda x: int(x), s.split(' ')))

def construct_n2(n2):
	s = ''
	for i in range(n2 + 1):
		if i % 2 == 0:
			s = s + '0'
		else:
			s = s + '1'
	return s

def insert_n3(s, n3):
	new_piece = '1' * (n3 + 1)
	s = s[:1] + new_piece + s[2:]
	return s

def insert_n1(s, n1):
	new_piece = '0' * (n1 + 1)
	s = new_piece + s[1:]
	return s

def solve(n1, n2, n3):
	if n2 > 0:
		s = construct_n2(n2)
		s = insert_n3(s, n3)
		s = insert_n1(s, n1)
		return s
	else:
		if n1 > 0:
			return '0' * (n1 + 1)
		if n3 > 0:
			return '1' * (n3 + 1)
t = int(input())
answers = []
for i in range(t):
	(n1, n2, n3) = to_list(input())
	answers.append(solve(n1, n2, n3))
print('\n'.join(answers))


def opp(a):
	if a == '1':
		return '0'
	else:
		return '1'
t = int(input())
for _ in range(t):
	(n0, n1, n2) = map(int, input().split())
	zero_str = '0'
	one_str = '1'
	for i in range(n0):
		zero_str += '0'
	if n0 == 0:
		zero_str = ''
	for j in range(n2):
		one_str += '1'
	if n2 == 0:
		one_str = ''
	ans_str = zero_str + one_str
	if n0 == n2 == 0:
		ans_str = '0'
		for i in range(n1):
			ans_str += opp(ans_str[-1])
	else:
		for i in range(n1 - 1):
			ans_str += opp(ans_str[-1])
		if (n0 == 0 or n2 == 0) and n1 > 0:
			ans_str += opp(ans_str[-1])
	print(ans_str)


(n0, n1, n2) = [0] * 3
ans = ''
a1 = 0
for i in range(int(input())):
	(n0, n1, n2) = input().split()
	(n0, n1, n2) = (int(n0), int(n1), int(n2))
	if n1 == 0:
		if n2 == 0:
			ans = (n0 + 1) * '0'
		else:
			ans = (n2 + 1) * '1'
	else:
		ans += str(n1 % 2)
		while n1 != 1:
			ans += str(1 - int(ans[-1]))
			n1 -= 1
		if ans[-1] == '0':
			ans += '0' * n0 + '1' * (n2 + 1)
		else:
			ans += '1' * n2 + '0' * (n0 + 1)
	print(ans)
	ans = ''


t = int(input())
for i in range(t):
	(n0, n1, n2) = map(int, input().split())
	s = ''
	if n2 > 0:
		s += (n2 + 1) * '1'
	if n2 == 0 and n1 > 0:
		s += '1'
	for j in range(n1):
		if j % 2 == 0:
			s += '0'
		else:
			s += '1'
	b = -1
	for j in range(len(s)):
		if s[j] == '0':
			b = j
			break
	if s == '':
		s += '0' * (n0 + 1)
	else:
		s = s[:b + 1] + '0' * n0 + s[b + 1:]
	print(s)


from math import sqrt
t = int(input())
for i in range(t):
	(n0, n1, n2) = map(int, input().split())
	s = ''
	if n0 != 0:
		s += '0' * (n0 + 1)
	if n2 != 0:
		s += '1' * (n2 + 1)
	if n0 == 0 and n2 != 0:
		for i in range(n1):
			if i % 2 == 0:
				s += '0'
			else:
				s += '1'
	elif n2 == 0 and n0 != 0:
		for i in range(n1):
			if i % 2 == 0:
				s += '1'
			else:
				s += '0'
	elif n0 == 0 and n2 == 0:
		s += '10'
		for i in range(n1 - 1):
			if i % 2 == 0:
				s += '1'
			else:
				s += '0'
	elif n1 > 1:
		for i in range(n1 - 1):
			if i % 2 == 0:
				s += '0'
			else:
				s += '1'
	print(s)


from itertools import accumulate
t = int(input())
for _ in range(t):
	(n0, n1, n2) = map(int, input().split())
	ans = []
	for i in range(n1 + 1):
		if i % 2 == 0:
			ans.append('1')
		else:
			ans.append('0')
	for i in range(len(ans)):
		if ans[i] == '0':
			ans[i] = '0' * (n0 + 1)
			break
	for i in range(len(ans)):
		if ans[i] == '1':
			ans[i] = '1' * (n2 + 1)
			break
	if len(ans) == 1:
		ans = []
		if n0 > 0:
			ans.append('0' * (n0 + 1))
		else:
			ans.append('1' * (n2 + 1))
	print(*ans, sep='')


for testcase in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	if n1 == 0:
		if n0:
			ans = '0' * (n0 + 1)
		else:
			ans = '1' * (n2 + 1)
	else:
		ans = ['0' * (n0 + 1), '1' * (n2 + 1)]
		for i in range(n1 - 1):
			ans.append(str(i & 1))
		ans = ''.join(ans)
	print(ans)


import sys, os
from io import BytesIO, IOBase
import collections, itertools, bisect, heapq, math, string
BUFSIZE = 8192
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def main():
	t = int(input())
	num = []
	for i in range(t):
		temp = list(map(int, input().split()))
		num.append(temp)
	for i in range(t):
		(n0, n1, n2) = (num[i][0], num[i][1], num[i][2])
		if n1 == 0 and n0 != 0:
			print(''.join([x for x in ['0'] * (n0 + 1)]))
			continue
		if n1 == 0 and n2 != 0:
			print(''.join([x for x in ['1'] * (n2 + 1)]))
			continue
		if n1 % 2 == 1:
			a = '0' * n0
			b = '01' * (n1 // 2 + 1)
			c = '1' * n2
			print(a + b + c)
		else:
			a = '0' * n0
			b = '01' + '1' * n2 + '0' + '10' * (n1 // 2 - 1)
			print(a + b)
main()


from sys import stdin
input = stdin.readline
t = int(input())
for _ in range(t):
	n = list(map(int, input().split()))
	if n[1] == 0 and n[2] == 0:
		print('0' * (n[0] + 1))
	elif n[1] == 0 and n[0] == 0:
		print('1' * (n[2] + 1))
	elif n[0] == 0:
		print('1' * (n[2] + 1) + ('01' * 100)[:n[1]])
	elif n[2] == 0:
		print('0' * (n[0] + 1) + ('10' * 100)[:n[1]])
	else:
		s = []
		for i in range(n[0] + 1):
			s.append('0')
		for i in range(n[2] + 1):
			s.append('1')
		n[1] -= 1
		if n[1] % 2 == 0:
			s.append('01' * (n[1] // 2))
		else:
			s.append('0')
			s.append('10' * ((n[1] - 1) // 2))
		print(''.join(s))


import sys
t = int(input())
for test in range(t):
	(n0, n1, n2) = map(int, input().split())
	s = ''
	s += '1' * (n2 + 1)
	if n1 == 0 and n0 == 0:
		print('1' * (n2 + 1))
		continue
	if n1 == 0 and n2 == 0:
		print('0' * (n0 + 1))
		continue
	for i in range(n1):
		temp = i % 2
		s += str(temp)
	if n0 == 0:
		print(s)
		continue
	if s[len(s) - 1] == '0':
		s += '0' * n0
	else:
		s = '1' * (n2 + 1) + '0' * (n0 + 1) + '1'
		for i in range(n1 - 2):
			temp = i % 2
			s += str(temp)
	print(s)


for _ in range(int(input())):
	n = [[int(i), ind] for (ind, i) in enumerate(input().split())]
	if n[1][0] != 0:
		(n[0], n[1]) = (n[1], n[0])
		flag = 0
	else:
		flag = 1
	s = []
	while n[0][0] != 0 or n[1][0] != 0 or n[2][0] != 0:
		while n[0][0] >= n[1][0] and n[0][0] != 0 or flag == 0:
			flag = 1
			n[0][0] -= 1
			if len(s) == 0:
				if n[0][1] == 0:
					s.extend([0, 0])
				elif n[0][1] == 1:
					s.extend([0, 1])
				else:
					s.extend([1, 1])
			elif n[0][1] == 0:
				if s[-1] == 0:
					s.append(0)
				else:
					nexus = []
					while s[-1] != 0:
						nexus.append(s.pop())
					s.append(0)
					s.extend(reversed(nexus))
			elif n[0][1] == 1:
				if s[-1] == 0:
					s.append(1)
				else:
					s.append(0)
			elif s[-1] == 1:
				s.append(1)
			else:
				nexus = []
				while s[-1] != 1:
					nexus.append(s.pop())
				s.append(1)
				s.extend(reversed(nexus))
		n.sort(reverse=True)
	print(*s, sep='')


t = int(input())
for test in range(t):
	(n0, n1, n2) = [int(no) for no in input().split()]
	s = ''
	if n0 or n1:
		s = (n0 + 1) * '0'
	for i in range(n1):
		if i & 1:
			s += '0'
		else:
			s += '1'
	if n1 and n2 and (s[-1] == '0'):
		s = '1' + s[:-1]
	if n1 == 0 and n2:
		s += '1'
	s += n2 * '1'
	print(s)


def solve(n1, n2, n3):
	res = ''
	if n2 % 2 == 1:
		res = '10' * (n2 // 2 + 1)
		res = '1' * n1 + res
		res = res + '0' * n3
	else:
		n2 = n2 - 1
		if n2 > 0:
			res = '10' * (n2 // 2 + 1)
		elif n1 > 0:
			res = '1'
		else:
			res = '0'
		res = '1' * n1 + res
		res = res + '0' * n3
		if n2 > 0:
			res += '1'
	return res
t = int(input())
for i in range(0, t):
	(n3, n2, n1) = map(int, input().split())
	res = solve(n1, n2, n3)
	print(res)


import sys

def eprint(*args):
	print(*args, file=sys.stderr)
zz = 1
from math import *
if zz:
	input = sys.stdin.readline
else:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('all.txt', 'w')
t = int(input())
while t > 0:
	t -= 1
	(a, b, c) = map(int, input().split())
	if [a, b, c] == [1, 0, 0]:
		print('00')
	elif [a, b, c] == [0, 0, 1]:
		print('11')
	elif [a, b] == [0, 0]:
		print('1' * (c + 1))
	elif [b, c] == [0, 0]:
		print('0' * (a + 1))
	elif b % 2:
		if b == 1:
			print('0' * (a + 1) + '1' * (c + 1))
		else:
			print('0' * (a + 1) + '1' + '01' * ((b - 1) // 2) + '1' * c)
	else:
		print('0' * (a + 1) + '1' * (c + 1) + '01' * ((b - 2) // 2) + '0')


for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	s = ''
	if n0 > 0:
		s += '0' * (n0 + 1)
	if n2 > 0:
		s += '1' * (n2 + 1)
	f = 0
	if n0 > 0 and n2 > 0:
		n1 -= 1
	elif n1 != 0 and n0 == 0 and (n2 == 0):
		n1 += 1
	if n2 == 0:
		f = 1
	if n1 > 0:
		for i in range(n1):
			if f == 0:
				s += '0'
				f = 1
			else:
				s += '1'
				f = 0
	print(s)


for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	if b:
		s = ('10' * b)[:b + 1]
		if b % 2:
			print('1' * c + s + '0' * a)
		else:
			print('1' * c + s[:b] + '0' * a + '1')
	elif a:
		print('0' * (a + 1))
	else:
		print('1' * (c + 1))


for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	if n2 != 0 or n1 != 0:
		s = '1' * (n2 + 1)
	else:
		s = ''
	k = 0
	while n1 > 0:
		if k == 0:
			s += '0'
			k = 1
		else:
			s += '1'
			k = 0
		n1 -= 1
	cond = False
	if len(s) == 0:
		s += '0' * (n0 + 1)
		print(s)
		continue
	if s[-1] == '1':
		s = s[0:len(s) - 1]
		cond = True
	s += '0' * n0
	if cond == True:
		s += '1'
	print(s)


for i in range(int(input())):
	(z, y, x) = [int(i) for i in input().split()]
	if y == 0 and x != 0:
		print(1, end='')
	print('1' * x, end='')
	print('10' * (y // 2 + y % 2), end='')
	print('0' * z, end='')
	if y % 2 == 0 and y != 0:
		print(1, end='')
	if y == 0 and z != 0:
		print(0, end='')
	print()


tests = int(input())
for test in range(tests):
	n = list(map(int, input().split()))
	ans = []
	if n[1] == 0:
		if n[0] > 0:
			ans.extend([0] * (n[0] + 1))
		else:
			ans.extend([1] * (n[2] + 1))
		for x in ans:
			print(x, end='')
		print()
		continue
	ans.extend([0] * (n[0] + 1))
	x = n[1]
	if x % 2 == 0:
		x -= 1
	for i in range(x):
		ans.append(1 - i % 2)
	ans.extend([1] * n[2])
	if x != n[1]:
		ans.append(0)
	for x in ans:
		print(x, end='')
	print()


def Zs():
	return list(map(int, input().split()))

def Z():
	return int(input())

def solve(n0, n1, n2):
	if n1 == 0:
		if n0 > 0:
			return ['0'] * (n0 + 1)
		else:
			return ['1'] * (n2 + 1)
	ans = ['0'] * (n0 + 1) + ['1'] * (n2 + 1)
	for _ in range(n1 - 1):
		ans.append('0' if ans[-1] == '1' else '1')
	return ans
for _ in range(Z()):
	(n0, n1, n2) = Zs()
	ans = solve(n0, n1, n2)
	print(''.join(ans))


for _ in range(int(input())):
	s0 = ''
	s1 = ''
	s2 = ''
	s = ''
	p = 0
	(n0, n1, n2) = map(int, input().split())
	if n0 == 0 and n1 == 0:
		s = (n2 + 1) * '1'
	elif n1 == 0 and n2 == 0:
		s = (n0 + 1) * '0'
	elif n0 == 0 and n2 == 0:
		for i in range(n1 + 1):
			s += str(i % 2)
	else:
		s = '1' + (n0 + 1) * '0'
		n1 -= 1
		while n1 > 0:
			if p % 2 == 0:
				s += '1'
			else:
				s += '0'
			p += 1
			n1 -= 1
		s = n2 * '1' + s
	print(s)


t = int(input())
cases = []
for i in range(t):
	cases.append(list(map(int, input().strip().split())))

def solve(case):
	q = []
	q.append(['', case])
	while len(q) > 0:
		step = q.pop()
		if all(map(lambda x: x == 0, step[1])):
			return step[0]
		if step[0] == '':
			if step[1][0] > 0:
				q.append(['00', [step[1][0] - 1, step[1][1], step[1][2]]])
			if step[1][1] > 0:
				q.append(['01', [step[1][0], step[1][1] - 1, step[1][2]]])
				q.append(['10', [step[1][0], step[1][1] - 1, step[1][2]]])
			if step[1][2] > 0:
				q.append(['11', [step[1][0], step[1][1], step[1][2] - 1]])
		elif step[0][-1] == '0':
			if step[1][0] > 0:
				q.append([step[0] + '0', [step[1][0] - 1, step[1][1], step[1][2]]])
			if step[1][1] > 0:
				q.append([step[0] + '1', [step[1][0], step[1][1] - 1, step[1][2]]])
		else:
			if step[1][1] > 0:
				q.append([step[0] + '0', [step[1][0], step[1][1] - 1, step[1][2]]])
			if step[1][2] > 0:
				q.append([step[0] + '1', [step[1][0], step[1][1], step[1][2] - 1]])

def efficient_solve(case):
	sol = '0' if case[0] > 0 or (case[1] > 0 and case[2] == 0) else '1'
	for i in range(case[0]):
		sol += '0'
	if case[2] > 0 and sol != '1':
		sol += '1'
	for i in range(case[2]):
		sol += '1'
	flag = case[2] == 0
	for i in range(case[1] - 1 if case[0] > 0 and case[2] > 0 else case[1]):
		if flag:
			sol += '1'
		else:
			sol += '0'
		flag = not flag
	return sol
for case in cases:
	print(efficient_solve(case))


import sys
input = sys.stdin.buffer.readline
from collections import defaultdict
con = 10 ** 9 + 7
INF = float('inf')

def getlist():
	return list(map(int, input().split()))

def main():
	N = int(input())
	for _ in range(N):
		(n0, n1, n2) = getlist()
		ans = ''
		if n2 >= 1 and n0 >= 1:
			ans += '1' * (n2 + 1)
			ans += '0' * (n0 + 1)
			for i in range(n1 - 1):
				if i % 2 == 0:
					ans += '1'
				else:
					ans += '0'
		elif n2 >= 1 and n0 == 0:
			ans += '1' * (n2 + 1)
			for i in range(n1):
				if i % 2 == 0:
					ans += '0'
				else:
					ans += '1'
		elif n2 == 0 and n0 >= 1:
			ans += '0' * (n0 + 1)
			for i in range(n1):
				if i % 2 == 0:
					ans += '1'
				else:
					ans += '0'
		else:
			for i in range(n1 + 1):
				if i % 2 == 0:
					ans += '1'
				else:
					ans += '0'
		print(ans)
main()


import sys, bisect, string, math, time, functools, random
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
from itertools import permutations, combinations, groupby

def Golf():
	(*a,) = map(int, open(0))

def I():
	return int(input())

def S_():
	return input()

def IS():
	return input().split()

def LS():
	return [i for i in input().split()]

def LI():
	return [int(i) for i in input().split()]

def LI_():
	return [int(i) - 1 for i in input().split()]

def NI(n):
	return [int(input()) for i in range(n)]

def NI_(n):
	return [int(input()) - 1 for i in range(n)]

def StoLI():
	return [ord(i) - 97 for i in input()]

def ItoS(n):
	return chr(n + 97)

def LtoS(ls):
	return ''.join([chr(i + 97) for i in ls])

def GI(V, E, ls=None, Directed=False, index=1):
	org_inp = []
	g = [[] for i in range(V)]
	FromStdin = True if ls == None else False
	for i in range(E):
		if FromStdin:
			inp = LI()
			org_inp.append(inp)
		else:
			inp = ls[i]
		if len(inp) == 2:
			(a, b) = inp
			c = 1
		else:
			(a, b, c) = inp
		if index == 1:
			a -= 1
			b -= 1
		aa = (a, c)
		bb = (b, c)
		g[a].append(bb)
		if not Directed:
			g[b].append(aa)
	return (g, org_inp)

def GGI(h, w, search=None, replacement_of_found='.', mp_def={'#': 1, '.': 0}, boundary=1):
	mp = [boundary] * (w + 2)
	found = {}
	for i in range(h):
		s = input()
		for char in search:
			if char in s:
				found[char] = (i + 1) * (w + 2) + s.index(char) + 1
				mp_def[char] = mp_def[replacement_of_found]
		mp += [boundary] + [mp_def[j] for j in s] + [boundary]
	mp += [boundary] * (w + 2)
	return (h + 2, w + 2, mp, found)

def TI(n):
	return GI(n, n - 1)

def bit_combination(k, n=2):
	rt = []
	for tb in range(n ** k):
		s = [tb // n ** bt % n for bt in range(k)]
		rt += [s]
	return rt

def show(*inp, end='\n'):
	if show_flg:
		print(*inp, end=end)
YN = ['YES', 'NO']
Yn = ['Yes', 'No']
mo = 10 ** 9 + 7
inf = float('inf')
FourNb = [(1, 0), (-1, 0), (0, 1), (0, -1)]
EightNb = [(1, 0), (-1, 0), (0, 1), (0, -1), (1, 1), (-1, -1), (1, -1), (-1, 1)]
compas = dict(zip('EWNS', FourNb))
l_alp = string.ascii_lowercase
input = lambda : sys.stdin.readline().rstrip()

class Tree:

	def __init__(self, inp_size=None, init=True):
		self.LCA_init_stat = False
		self.ETtable = []
		if init:
			self.stdin(inp_size)
		return

	def stdin(self, inp_size=None, index=1):
		if inp_size == None:
			self.size = int(input())
		else:
			self.size = inp_size
		(self.edges, _) = GI(self.size, self.size - 1, index=index)
		return

	def listin(self, ls, index=0):
		self.size = len(ls) + 1
		(self.edges, _) = GI(self.size, self.size - 1, ls, index=index)
		return

	def __str__(self):
		return str(self.edges)

	def dfs(self, x, func=lambda prv, nx, dist: prv + dist, root_v=0):
		q = deque()
		q.append(x)
		v = [-1] * self.size
		v[x] = root_v
		while q:
			c = q.pop()
			for (nb, d) in self.edges[c]:
				if v[nb] == -1:
					q.append(nb)
					v[nb] = func(v[c], nb, d)
		return v

	def EulerTour(self, x):
		q = deque()
		q.append(x)
		self.depth = [None] * self.size
		self.depth[x] = 0
		self.ETtable = []
		self.ETdepth = []
		self.ETin = [-1] * self.size
		self.ETout = [-1] * self.size
		cnt = 0
		while q:
			c = q.pop()
			if c < 0:
				ce = ~c
			else:
				ce = c
				for (nb, d) in self.edges[ce]:
					if self.depth[nb] == None:
						q.append(~ce)
						q.append(nb)
						self.depth[nb] = self.depth[ce] + 1
			self.ETtable.append(ce)
			self.ETdepth.append(self.depth[ce])
			if self.ETin[ce] == -1:
				self.ETin[ce] = cnt
			else:
				self.ETout[ce] = cnt
			cnt += 1
		return

	def LCA_init(self, root):
		self.EulerTour(root)
		self.st = SparseTable(self.ETdepth, init_func=min, init_idl=inf)
		self.LCA_init_stat = True
		return

	def LCA(self, root, x, y):
		if self.LCA_init_stat == False:
			self.LCA_init(root)
		(xin, xout) = (self.ETin[x], self.ETout[x])
		(yin, yout) = (self.ETin[y], self.ETout[y])
		a = min(xin, yin)
		b = max(xout, yout, xin, yin)
		id_of_min_dep_in_et = self.st.query_id(a, b + 1)
		return self.ETtable[id_of_min_dep_in_et]

class SparseTable:

	def __init__(self, ls, init_func=min, init_idl=float('inf')):
		self.func = init_func
		self.idl = init_idl
		self.size = len(ls)
		self.N0 = self.size.bit_length()
		self.table = [ls[:]]
		self.index = [list(range(self.size))]
		self.lg = [0] * (self.size + 1)
		for i in range(2, self.size + 1):
			self.lg[i] = self.lg[i >> 1] + 1
		for i in range(self.N0):
			tmp = [self.func(self.table[i][j], self.table[i][min(j + (1 << i), self.size - 1)]) for j in range(self.size)]
			tmp_id = [self.index[i][j] if self.table[i][j] == self.func(self.table[i][j], self.table[i][min(j + (1 << i), self.size - 1)]) else self.index[i][min(j + (1 << i), self.size - 1)] for j in range(self.size)]
			self.table += [tmp]
			self.index += [tmp_id]

	def query(self, l, r):
		r = min(self.size, r)
		N = self.lg[r - l]
		return self.func(self.table[N][l], self.table[N][r - (1 << N)])

	def query_id(self, l, r):
		N = self.lg[r - l]
		(a, b) = (self.index[N][l], self.index[N][r - (1 << N)])
		if self.table[0][a] == self.func(self.table[N][l], self.table[N][r - (1 << N)]):
			b = a
		return b

	def __str__(self):
		return str(self.table[0])

	def print(self):
		for i in self.table:
			print(*i)
show_flg = False
show_flg = True
ans = 0
T = I()
for _ in range(T):
	(a, b, c) = LI()
	B = b
	s = []
	if a > 0:
		s += [0] * -~a
	if c > 0:
		s += [1] * -~c
	if a == c == 0:
		s = [0]
	elif a * c == 0:
		b -= 0
	else:
		b -= 1
	for i in range(b):
		s += [1 - s[-1]]
	for i in s:
		print(i, end='')
	print()


t = int(input())
for i in range(t):
	(n0, n1, n2) = map(int, input().split())
	s = ''
	if n0 > 0:
		for i in range(n0 + 1):
			s += '0'
	if n2 > 0:
		if len(s) > 0:
			n1 -= 1
		for i in range(n2 + 1):
			s += '1'
	if n1 > 0:
		if len(s) > 0:
			f = 0
			if s[-1] == '0':
				f = 1
			for i in range(n1):
				if f == 1:
					s += '1'
					f = 0
				else:
					s += '0'
					f = 1
		else:
			f = 0
			for i in range(n1 + 1):
				if f == 1:
					s += '1'
					f = 0
				else:
					s += '0'
					f = 1
	print(s)


from math import *
mod = 10 ** 9 + 7

def _in():
	return [int(x) for x in input().split(' ')]

def main():
	(n0, n1, n2) = _in()
	if n0 != 0 and n1 + n2 == 0:
		print('0' * (n0 + 1))
	elif n2 != 0 and n0 + n1 == 0:
		print('1' * (n2 + 1))
	elif n1 != 0 and n0 + n2 == 0:
		i = 0
		for j in range(n1 + 1):
			print(i, end='')
			i = i ^ 1
		print()
	else:
		if n1 % 2 == 0:
			print('1', end='')
		print('0' * (n0 + 1), end='')
		i = 1
		for j in range(n1 - (n1 % 2 == 0)):
			print(i, end='')
			i = i ^ 1
		print('1' * n2)
for _ in range(int(input())):
	main()


T = int(input())
for i in range(T):
	(n0, n1, n2) = [int(x) for x in input().split()]
	if n1 == 0 and n2 == 0:
		L = ''.join(['0' for x in range(n0 + 1)])
	elif n1 == 0 and n0 == 0:
		L = ''.join(['1' for x in range(n2 + 1)])
	else:
		L = '0'
		for i in range(n0):
			L += '0'
		L += '1'
		for i in range(n2):
			L += '1'
		while n1 > 1:
			n1 -= 1
			L += str(1 - int(L[-1]))
	print(L)


from sys import stdin, exit
input = stdin.readline

def i():
	return input()

def ii():
	return int(input())

def iis():
	return map(int, input().split())

def liis():
	return list(map(int, input().split()))

def print_array(a):
	print(''.join(map(str, a)))
t = ii()
for _ in range(t):
	(n1, n2, n3) = iis()
	ans = []
	if n2 == 0 and n3 == 0:
		print('0' * (n1 + 1))
		continue
	if n1 == 0 and n2 == 0:
		print('1' * (n3 + 1))
		continue
	if n1 == 0 and n3 == 0:
		for i in range(n2 + 1):
			if i % 2 == 0:
				ans.append(0)
			else:
				ans.append(1)
		print_array(ans)
		continue
	for i in range(n1 + 1):
		ans.append(0)
	for i in range(n3 + 1):
		ans.append(1)
	for i in range(n2 - 1):
		if i % 2 == 0:
			ans.append(0)
		else:
			ans.append(1)
	print_array(ans)


for ii in range(int(input())):
	(a, b, c) = map(int, input().split())
	if b == 0:
		ans = ''
		if a != 0:
			for i in range(a + 1):
				ans += '0'
		if c != 0:
			for i in range(c + 1):
				ans += '1'
		print(ans)
		continue
	ans = ''
	for i in range(b + 1):
		if i % 2 == 0:
			ans += '1'
		else:
			ans += '0'
	ans = '1' * c + ans[0] + '0' * a + ans[1:]
	print(ans)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for yu in range(int(input())):
	(a, b, c) = map(int, input().split())
	s = ''
	for j in range(a):
		if j == 0:
			s += '00'
		else:
			s += '0'
	for j in range(b):
		if s == '':
			s += '10'
		elif s[-1] == '1':
			s += '0'
		else:
			s += '1'
	if s == '':
		s += '1' * (c + 1)
	elif s[-1] == '1':
		s += '1' * c
	else:
		s = s[:-1]
		s += '1' * c
		s += '0'
	print(s)


from sys import stdin, stdout
import math
from collections import defaultdict
input = stdin.buffer.readline
t = int(input())
for _ in range(t):
	(a, b, c) = list(map(int, input().split()))
	n = a + b + c + 1
	ss = '0' * (a + 1)
	if b == 0 and a == 0:
		print((c + 1) * '1')
	elif b == 0 and c == 0:
		print((a + 1) * '0')
	elif a == 0 and c == 0:
		if b % 2 == 1:
			print('10' * math.ceil(b / 2))
		else:
			print('10' * (b // 2) + '1')
	elif b == 1:
		print('1' * (n - a - 1) + ss)
	elif b == 2:
		print('1' + ss + (n - a - 2) * '1')
	else:
		ss = '1' + ss
		b -= 1
		num = b // 2
		sid = b % 2
		temp = ''
		if sid == 1:
			temp = '10' * num + '1'
		else:
			temp = '10' * num
		far = (n - len(ss) - len(temp)) * '1' + ss + temp
		print(far)


import sys
from collections import deque, defaultdict as dd
from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right
from itertools import permutations
from datetime import datetime
from math import ceil, sqrt, log, gcd

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def read():
	tc = 0
	if tc:
		input = sys.stdin.readline
	else:
		sys.stdin = open('input1.txt', 'r')
		sys.stdout = open('output1.txt', 'w')

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	x = []
	for p in range(2, n + 1):
		if prime[p]:
			x.append(p)
	return x

def solve():
	for _ in range(ii()):
		(a, b, c) = mi()
		if b == 0:
			if c == 0:
				print('0' * (a + 1))
			else:
				print('1' * (c + 1))
			continue
		ans = ''
		for i in range(b + 1):
			if i & 1:
				ans += '0'
			else:
				ans += '1'
		ans = list(ans)
		ans.insert(0, '1' * c)
		ans.insert(2, '0' * a)
		print(''.join(ans))
solve()


for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	s = ''
	if a != 0:
		s += '0' * (a + 1)
	if b != 0:
		B = ''
		for i in range(b + 1):
			if i % 2 == 0:
				B += '0'
			else:
				B += '1'
		if a != 0:
			B = B[1:]
		s += B
	if c != 0:
		C = '1' * (c + 1)
		if a != 0 or b != 0:
			if s[-1] == '1':
				C = C[1:]
			elif b != 0 and s[-1] == '0':
				s = s[:-1]
				C = C[1:] + '0'
		s += C
	print(s)


t = int(input())
while t:
	(a, b, c) = map(int, input().split())
	ans = '1'
	now = 0
	if b % 2:
		while c:
			ans += '1'
			c -= 1
		while b:
			ans += '1' if now else '0'
			b -= 1
			now = 1 - now
		while a:
			ans += '0'
			a -= 1
	else:
		ans = ''
		now = 1
		if a and c:
			b -= 1
			ans = '10'
		elif a:
			now = 1
			ans = '0'
		elif c:
			now = 0
			ans = '1'
		else:
			ans = '1'
			now = 0
		while c:
			ans = '1' + ans
			c -= 1
		while a:
			ans += '0'
			a -= 1
		while b > 0:
			ans += '1' if now else '0'
			b -= 1
			now = 1 - now
	print(ans)
	t -= 1


t = int(input())
while t > 0:
	t = t - 1
	(x, y, z) = map(int, input().split())
	if x > 0 and y == 0 and (z == 0):
		print('0' * (x + 1))
		continue
	if z > 0 and x == 0 and (y == 0):
		print('1' * (z + 1))
		continue
	ans = '1' * (z + 1) + '0' * (x + 1)
	for i in range(1, y):
		if ans[-1] == '1':
			ans = ans + '0'
		else:
			ans = ans + '1'
	print(ans)


from queue import LifoQueue

def print_sol(c, sol):
	print('Case #{}: {}'.format(c, sol))

def rd_int():
	return int(input())

def rd_str():
	return input()

def rd_str_lst():
	return input().split(' ')

def sp_str_lst():
	return list(input())

def rd_int_lst():
	return [int(i) for i in rd_str_lst()]

def sp_int_lst():
	return [int(i) for i in sp_str_lst()]

def dfs(g, i, v):
	v[i] = True
	for j in g[i]:
		if not v[j]:
			dfs(g, j, v)
	print(i)

def dfs_iter(g, i, n):
	v = [False] * n
	stack = LifoQueue()
	stack.put(i)
	while stack.not_empty:
		u = stack.get()
		v[u] = True
		print(u)
		for i in g[u]:
			if not v[i]:
				stack.put(i)

def als(x):
	sa = [1 if i % 2 == 0 else 0 for i in range(x)]
	return sa

def main():
	t = rd_int()
	for c in range(1, t + 1):
		(n0, n1, n2) = rd_int_lst()
		if n1 == 0:
			if n0 > 0:
				s = [0] * (n0 + 1)
			else:
				s = [1] * (n2 + 1)
		else:
			s1 = als(n1 - 1)
			s2 = [1] * (n2 + 1)
			s0 = [0] * (n0 + 1)
			s = s2 + s0 + s1
		print(*s, sep='')
main()


for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	if n1 == 0:
		if n0 == 0:
			print((n2 + 1) * '1')
		else:
			print((n0 + 1) * '0')
	else:
		ans = ''
		for i in range(n1 + 1):
			ans += '1' if i % 2 == 0 else '0'
		(fone, fzero) = (None, None)
		for (i, c) in enumerate(ans):
			if c == '1' and fone == None:
				fone = i
		ans = ans[:fone] + n2 * '1' + ans[fone:]
		for (i, c) in enumerate(ans):
			if c == '0' and fzero == None:
				fzero = i
		ans = ans[:fzero] + n0 * '0' + ans[fzero:]
		print(ans)


t = int(input())
while t:
	t -= 1
	v = list(map(int, input().strip().split()))[:3]
	if v[0] + v[1]:
		if v[1] and v[1] % 2 == 0:
			print('1', end='')
		for i in range(v[0]):
			print('0', end='')
		if v[1] == 0:
			print('0', end='')
		for i in range((v[1] + 1) // 2):
			print('01', end='')
		for i in range(v[2]):
			print('1', end='')
	else:
		for i in range(v[2] + 1):
			print('1', end='')
	print('')


import sys
from collections import defaultdict, deque
from math import sqrt, gcd, factorial

def input():
	return sys.stdin.readline()[:-1]

def solve():
	(a, c, b) = [int(x) for x in input().split()]
	ans = ''
	if a:
		ans += '0' * (a + 1)
	if b:
		ans += '1' * (b + 1)
	if a and b:
		c -= 1
	if c:
		for i in range(c + 1 - bool(a or b)):
			i += b == 0
			i = i % 2
			ans += str(i)
	print(ans)
t = 1
t = int(input())
for case in range(1, t + 1):
	ans = solve()


from sys import stdin
import collections

def solve(tc):
	(n0, n1, n2) = map(int, stdin.readline().split())
	if n0 > 0 or n1 > 0:
		s = ['0']
	else:
		s = ['1']
	for i in range(n0):
		s.append('0')
	for i in range(n1):
		if s[-1] == '0':
			s.append('1')
		else:
			s.append('0')
	pushzero = False
	if s[-1] == '0':
		s.pop()
		pushzero = True
	for i in range(n2):
		s.append('1')
	if pushzero:
		s.append('0')
	print(''.join(s))
LOCAL_TEST = not __debug__
if LOCAL_TEST:
	infile = __file__.split('.')[0] + '-test.in'
	stdin = open(infile, 'r')
tcs = int(stdin.readline().strip())
tc = 1
while tc <= tcs:
	solve(tc)
	tc += 1


t = int(input())
for _ in range(t):
	(a, b, c) = map(int, input().split())
	l = []
	r = []
	q = []
	if c != 0:
		l = ['1'] * (1 + c)
	if a != 0:
		r = ['0'] * (1 + a)
	if a == 0 and c == 0:
		if b % 2 == 0:
			q = ['10'] * (b // 2)
			q.append('1')
		else:
			q = ['10'] * ((b + 1) // 2)
	elif b != 0:
		if a == 0 and c != 0:
			if b % 2 != 0:
				q = ['01'] * (b // 2)
				q.append('0')
			else:
				q = ['01'] * ((b + 1) // 2)
		elif c == 0 and a != 0:
			if b % 2 != 0:
				q = ['10'] * (b // 2)
				q.append('1')
			else:
				q = ['10'] * ((b + 1) // 2)
		elif c != 0 and a != 0:
			q = ['10'] * ((b - 1) // 2)
			if b % 2 == 0:
				q.append('1')
	if len(l) != 0:
		for i in range(len(l)):
			print(l[i], end='')
	if len(r) != 0:
		for i in range(len(r)):
			print(r[i], end='')
	if len(q) != 0:
		for i in range(len(q)):
			print(q[i], end='')
	print()


t = int(input())
for _ in range(t):
	(n0, n1, n2) = tuple([int(e) for e in input().split()])
	if not n1:
		if n2:
			s = '1' * (n2 + 1)
		else:
			s = '0' * (n0 + 1)
	else:
		ch = ['1', '0']
		idx = 0
		s = '10'
		n1 -= 1
		while n1 > 0:
			s += ch[idx]
			idx ^= 1
			n1 -= 1
		s = '1' * (n2 + 1) + '0' * n0 + s[1:]
	print(s)


t = int(input())
for _ in range(t):
	(a, b, c) = map(int, input().split())
	if a != 0:
		print('0' * (a + 1), end='')
	if c != 0:
		print('1' * (c + 1), end='')
	if a == 0 and c == 0 and (b != 0):
		d = 0
		for i in range(b + 1):
			print(d, end='')
			d ^= 1
	elif a == 0 and c != 0 and (b != 0):
		d = 0
		for i in range(b):
			print(d, end='')
			d ^= 1
	elif a != 0 and c == 0 and (b != 0):
		d = 1
		for i in range(b):
			print(d, end='')
			d ^= 1
	elif a != 0 and c != 0 and (b != 0):
		d = 0
		for i in range(b - 1):
			print(d, end='')
			d ^= 1
	print('')


t = int(input())
for _ in range(t):
	(n0, n1, n2) = map(int, input().rstrip().split())
	if n1 == 0:
		if n0 != 0:
			print('0' * (n0 + 1))
		else:
			print('1' * (n2 + 1))
	else:
		res = ''
		for pos in range(n1 + 1):
			if pos & 1:
				res += '0'
			else:
				res += '1'
		pos1 = res.index('1')
		res = res[0:pos1] + '1' * n2 + res[pos1:]
		pos0 = res.index('0')
		res = res[0:pos0] + '0' * n0 + res[pos0:]
		print(res)


from collections import *
from bisect import *
from math import *
import sys
input = sys.stdin.readline
t = int(input())
while t:
	t -= 1
	s = ''
	(no, no1, n1) = map(int, input().split())
	if no and n1:
		s = '0' * (no + 1) + '1' * (n1 + 1)
	elif no:
		s = '0' * (no + 1)
	elif n1:
		s = '1' * (n1 + 1)
	else:
		s = ''
	if no and n1:
		no1 -= 1
	if no1 and no == 0 and (n1 == 0):
		s = '1'
	for i in range(no1):
		if s[-1] == '1':
			s += '0'
		else:
			s += '1'
	print(s)


from collections import deque
t = int(input())
for _ in range(t):
	(n0, n1, n2) = [int(p) for p in input().split()]
	if n1 % 2 != 0:
		ans = deque()
		ans.append(1)
		ans.append(0)
		while n1 != 1:
			ans.append(1 - ans[-1])
			n1 -= 1
		while n2 != 0:
			ans.appendleft(1)
			n2 -= 1
		while n0 != 0:
			ans.append(0)
			n0 -= 1
	else:
		ans = deque()
		if n0 != 0:
			while n0 != -1:
				ans.append(0)
				n0 -= 1
		if n2 != 0:
			while n2 != -1:
				ans.append(1)
				n2 -= 1
		if n1 != 0:
			if not ans:
				ans.append(1)
				while n1 != 0:
					ans.append(1 - ans[-1])
					n1 -= 1
			elif n0 == 0 or n2 == 0:
				while n1 != 0:
					ans.append(1 - ans[-1])
					n1 -= 1
			else:
				while n1 != 1:
					ans.append(1 - ans[-1])
					n1 -= 1
	final = ''
	for i in ans:
		final += str(i)
	print(final)


t = int(input())
for _ in range(t):
	(n0, n1, n2) = map(int, input().split())
	ans = ''
	if n0 == 0 and n1 == 0:
		for i in range(n2 + 1):
			ans = ans + '1'
	else:
		for i in range(n0):
			ans = ans + '0'
		if n1 % 2 == 1:
			for i in range(n1 + 1):
				if i % 2 == 0:
					ans = ans + '0'
				else:
					ans = ans + '1'
			for i in range(n2):
				ans = ans + '1'
		else:
			for i in range(n1):
				if i % 2 == 0:
					ans = ans + '0'
				else:
					ans = ans + '1'
			for i in range(n2):
				ans = ans + '1'
			ans = ans + '0'
	print(ans)


t = int(input())
for i in range(t):
	(n0, n1, n2) = map(int, input().split())
	if n1 == 0:
		if n0 == 0:
			print('1' * (n2 + 1))
		elif n2 == 0:
			print('0' * (n0 + 1))
	else:
		n3 = '1' * (n2 + 1) + '0' * (n0 + 1)
		n4 = '10' * n1
		print(n3 + n4[:n1 - 1])


from math import *

def solver():
	(a, b, c) = map(int, input().split())
	s = ''
	t = True
	if b == 0:
		if a:
			print('0' * (a + 1))
		else:
			print('1' * (c + 1))
		return
	while b + 1:
		if t:
			s += '1'
		else:
			s += '0'
		t = not t
		b -= 1
	s = '1' * c + '1' + '0' * a + s[1:]
	print(s)
for _ in range(int(input())):
	solver()


t = int(input())
for _ in range(t):
	(a, b, c) = [int(i) for i in input().split()]
	if b == 0:
		if c == 0:
			print('0' * (a + 1), end='')
		else:
			print('1' * (c + 1), end='')
		print()
		continue
	print('0' * (a + 1), end='')
	print('1' * (c + 1), end='')
	print('01' * ((b - 1) // 2), end='')
	if b % 2 == 0:
		print('0', end='')
	print()


t = int(input())
for _ in range(t):
	(n0, n01, n1) = [int(x) for x in input().split()]
	if n01 == 0:
		if n0 == 0:
			ans = '1' * (n1 + 1)
		else:
			ans = '0' * (n0 + 1)
	else:
		ans = '0' * (n0 + 1) + '1' * (n1 + 1)
		if n01 % 2 == 0:
			ans = ans + '0' + '10' * ((n01 - 2) // 2)
		else:
			ans = ans + '01' * ((n01 - 1) // 2)
	print(ans)


for i in range(int(input())):
	(n0, n1, n2) = list(map(int, input().split()))
	outPut = ''
	if n2 > 0:
		outPut = '1' * (n2 + 1)
		if n1 > 0:
			n1 -= 1
			outPut += '0' * (n0 + 1)
			if n1 % 2 == 0:
				outPut += '10' * (n1 // 2)
			else:
				outPut += '1' + '01' * (n1 // 2)
	elif n1 > 0:
		outPut = '10'
		n1 -= 1
		outPut += '0' * n0
		if n1 % 2 == 0:
			outPut += '10' * (n1 // 2)
		else:
			outPut += '1' + '01' * (n1 // 2)
	else:
		outPut = '0' * (n0 + 1)
	print(outPut)


t = int(input())
for tt in range(t):
	(n0, n1, n2) = (int(i) for i in input().split())
	if n1 == 0 and n2 == 0:
		print('0' * (n0 + 1))
		continue
	if n1 == 0 and n0 == 0:
		print('1' * (n2 + 1))
		continue
	ans = '0' * (n0 + 1) + '1' * (n2 + 1)
	parity = 0
	for i in range(n1 - 1):
		ans += str(parity)
		parity ^= 1
	print(ans)


def ans_v2(n_0, n_1, n_2):
	ans_left = ''
	ans_center = ''
	ans_right = ''
	if n_1 == 0:
		if n_0 > 0:
			ans_left = '0' * (n_0 + 1)
		else:
			ans_right = '1' * (n_2 + 1)
	elif n_0 == 0:
		if n_1 % 2 == 0:
			ans_left = '10' * (n_1 // 2)
		else:
			ans_left = '0' + '10' * ((n_1 - 1) // 2)
		ans_center = '1' * (n_2 + 1)
	elif n_2 == 0:
		if n_1 % 2 == 0:
			ans_left = '01' * (n_1 // 2)
		else:
			ans_left = '1' + '01' * ((n_1 - 1) // 2)
		ans_right = '0' * (n_0 + 1)
	else:
		ans_right = '0' * (n_0 + 1)
		ans_center = '1' * (n_2 + 1)
		if n_1 % 2 == 0:
			ans_left = '0' + '10' * ((n_1 - 2) // 2)
		else:
			ans_left = '10' * ((n_1 - 1) // 2)
	return ans_left + ans_center + ans_right
t = int(input())
for i in range(t):
	input_nums = input().split(' ')
	answer = ans_v2(int(input_nums[0]), int(input_nums[1]), int(input_nums[2]))
	print(answer)


t = int(input())
for _ in range(t):
	(n0, n1, n2) = [int(i) for i in input().split()]
	if n1 == 0:
		if n0:
			print('0' * (n0 + 1))
		else:
			print('1' * (n2 + 1))
	else:
		s2 = ''
		if n2:
			s2 += '1' * n2
		start = 1
		for i in range(n1 + 1):
			if start:
				s2 += '1'
				start = (start + 1) % 2
			else:
				s2 += '0'
				start = (start + 1) % 2
		if n0:
			if s2[-1] == '0':
				s2 += '0' * n0
			else:
				s2 = s2[:-1]
				s2 += '0' * n0
				s2 += '1'
		print(s2)


t = int(input())
for _ in range(t):
	(n0, n1, n2) = map(int, input().split())
	if n1 == 0:
		if n0:
			print('0' * (n0 + 1))
		elif n2:
			print('1' * (n2 + 1))
	else:
		string = ''.join([str((i + 1) % 2) for i in range(n1 + 1)])
		string = '1' * n2 + string[0] + '0' * n0 + string[1:]
		print(string)


for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	ones = '1' * (n2 + 1) if n2 > 0 else ''
	zeros = '0' * (n0 + 1) if n0 > 0 else ''
	final = ones + zeros
	if ones and zeros:
		n1 -= 1
		final += '10' * (n1 // 2) + '1' * (n1 % 2)
	elif ones:
		final += '01' * (n1 // 2) + '0' * (n1 % 2)
	elif zeros:
		final += '10' * (n1 // 2) + '1' * (n1 % 2)
	else:
		final = '10' if n1 > 0 else ''
		final += '10' * ((n1 - 1) // 2) + '1' * (max(0, n1 - 1) % 2)
	print(final)


from collections import Counter, defaultdict, deque
from operator import itemgetter
import math
import sys
input = sys.stdin.readline

def solve():
	(a, b, c) = [int(x) for x in input().split()]
	if not (a or b):
		print('1' * (c + 1))
		return
	if not (c or b):
		print('0' * (a + 1))
		return
	d = []
	par = 1
	for i in range(b + 1):
		d.append(str(par))
		par ^= 1
	d[0] = '1' * (c + 1)
	d[1] = '0' * (a + 1)
	print(''.join(d))
tt = int(input())
for test in range(tt):
	solve()


for i in range(int(input())):
	(a, b, c) = map(int, input().split())
	s = ''
	s1 = '1' * c
	s0 = '0' * a
	if b > 0:
		s += '1'
		for j in range(b):
			if j % 2 == 0:
				s += '0'
			else:
				s += '1'
		s = s[0] + s0 + s[1:]
		s = s1 + s
	else:
		s = s1 + s0
		if a != 0:
			s += '0'
		else:
			s += '1'
	print(s)


import math, sys, bisect, heapq
from collections import defaultdict, Counter, deque
from itertools import groupby, accumulate
from functools import lru_cache
int1 = lambda x: int(x) - 1
input = iter(sys.stdin.buffer.read().decode().splitlines()).__next__
aj = lambda : list(map(int, input().split()))

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def Y(c):
	print(['NO', 'YES'][c])

def y(c):
	print(['no', 'yes'][c])

def Yy(c):
	print(['No', 'Yes'][c])

def onepair(n):
	return '1' * (n + 1)

def zeropair(n):
	return '0' * (n + 1)

def one_0(n):
	S = []
	for i in range(n + 1):
		if i % 2:
			S.append('1')
		else:
			S.append('0')
	return ''.join(S)
for _ in range(int(input())):
	(a, b, c) = aj()
	if a == b == c == 0:
		print('')
	elif b == 0:
		if a == 0:
			print(onepair(c))
		else:
			print(zeropair(a))
	else:
		add = False
		ans = one_0(b)
		if ans[-1] == ans[0]:
			add = True
			ans = ans[:-1]
		ans = zeropair(a - 1) + ans + onepair(c - 1)
		if add:
			ans += '0'
		print(ans)


t = int(input())
for tt in range(t):
	(n0, n1, n2) = map(int, input().split())
	sol = ''
	moved = False
	if n0 > 0 and n1 + n2 == 0:
		sol = '0' * (n0 + 1)
	elif n2 > 0 and n0 + n1 == 0:
		sol = '1' * (n2 + 1)
	else:
		if n2 > 0:
			sol = '1' * (n2 + 1)
		while n1 > 0:
			if sol == '':
				sol = '1'
			if sol[-1] == '1':
				sol += '0'
			else:
				sol += '1'
			n1 -= 1
		while n0 > 0:
			if sol[-1] == '1':
				moved = True
				sol = sol[:-1]
			sol += '0'
			n0 -= 1
		if moved:
			sol += '1'
	print(sol)


for i in range(int(input())):
	(a, b, c) = map(int, input().split())
	print('0' * (a + 1) + '1' * (c + 1) + '01' * ((b - 1) // 2) + '0' * ((b - 1) % 2)) if b > 0 else print('0' * (a + 1)) if a > 0 else print('1' * (c + 1))


import sys

def print(val):
	sys.stdout.write(val)
input = sys.stdin.buffer.readline

def prog():
	for _ in range(int(input().strip())):
		(a, b, c) = map(int, input().split())
		d = 0
		bits = '0' * a
		if a != 0:
			bits += '0'
		bits += '1' * c
		if c != 0:
			bits += '1'
		if c == 0:
			d = 1
		if a == 0 and c == 0:
			bits = '0'
		if a > 0 and c > 0:
			b -= 1
		for i in range(b):
			if (i + d) % 2 == 0:
				bits += '0'
			else:
				bits += '1'
		print(bits + '\n')
prog()


for _ in range(int(input())):
	(a, b, c) = [int(x) for x in input().split()]
	s = '0' * (a + 1 if a > 0 else 0) + '1' * (c + 1 if c > 0 else 0)
	for i in range(b - 1 if a * c != 0 else b):
		try:
			s += str(1 - int(s[-1]))
		except:
			s = '01'
	print(s)


t = int(input())
for _ in range(t):
	(n0, n1, n2) = list(map(int, input().split()))
	if n2 > 0:
		s = '11'
		n2 -= 1
	elif n1 > 0:
		s = '10'
		n1 -= 1
	else:
		s = '00'
		n0 -= 1
	while n0 > 0 or n1 > 0 or n2 > 0:
		if n2 > 0:
			s += '1'
			n2 -= 1
		elif s[-1] == '0' and n0 > 0:
			s += '0'
			n0 -= 1
		elif s[-1] == '1' and n1 > 0:
			s += '0'
			n1 -= 1
		elif s[-1] == '0' and n1 > 0:
			s += '1'
			n1 -= 1
	print(s)


import math
t = int(input())
while t:
	t = t - 1
	(n0, n1, n2) = [int(s) for s in input().split()]
	str1 = []
	for i in range(math.ceil(n1 / 2)):
		str1.append(0)
		str1.append(1)
	eve = 0
	if n1 % 2 == 0 and n1 > 0:
		eve = 1
	if len(str1) != 0:
		str0 = [0] * n0
		str2 = [1] * n2
		if eve == 0:
			ans = str0 + str1 + str2
		if eve == 1:
			ans = str0 + str1 + str2 + [0]
	else:
		if n0 != 0:
			ans = [0] * (n0 + 1)
		if n2 != 0:
			ans = [1] * (n2 + 1)
	for i in ans:
		print(i, end='')
	print()


import sys
input = sys.stdin.readline

def main():
	t = int(input())
	for _ in range(t):
		(N0, N1, N2) = [int(x) for x in input().split()]
		if N1 % 2 == 1:
			ans = '1' * N2 + '10' * -(-N1 // 2) + '0' * N0
		else:
			ans = '0' * N0 + '01' * (N1 // 2) + '1' * N2
			if N1 > 0:
				ans = '1' + ans
		if N1 == 0 and N2 > 0:
			print(ans + '1')
		elif N1 == 0 and N0 > 0:
			print(ans + '0')
		else:
			print(ans)
main()


t = int(input())
for _ in range(t):
	(n0, n1, n2) = [int(x) for x in input().split()]
	arr = []
	while n0 > 0:
		if len(arr) > 0:
			n0 -= 1
		arr.append(0)
	while n1 > 0:
		if len(arr) == 0:
			arr.append(0)
		else:
			if arr[-1] == 0:
				arr.append(1)
			else:
				arr.append(0)
			n1 -= 1
	while n2 > 0:
		if len(arr) > 0:
			if arr[-1] == 1:
				arr.append(1)
			else:
				arr.insert(-1, 1)
			n2 -= 1
		else:
			arr.append(1)
	print(''.join([str(x) for x in arr]))


t = int(input())
for _ in range(t):
	(n0, n1, n2) = map(int, input().split())
	if n1 == 0:
		if n0 > 0:
			print('0' * (n0 + 1))
		else:
			print('1' * (n2 + 1))
	else:
		res = ''
		temp = '0' * (n0 + 1)
		res += temp
		temp = ''
		temp = '1' * (n2 + 1)
		res += temp
		n1 -= 1
		curr = 1
		for i in range(n1):
			curr = curr ^ 1
			res += str(curr)
		print(res)


import sys
import math

def inputnum():
	return int(input())

def inputnums():
	return map(int, input().split())

def inputlist():
	return list(map(int, input().split()))

def inputstring():
	return [x for x in input()]
t = int(input())
for q in range(t):
	(n1, n2, n3) = inputnums()
	if n2 == 0 and n3 == 0:
		rtn = ''
		for i in range(n1 + 1):
			rtn += '0'
		print(rtn)
		continue
	elif n2 == 0 and n1 == 0:
		rtn = ''
		for i in range(n3 + 1):
			rtn += '1'
		print(rtn)
		continue
	else:
		rtn = ''
		for i in range(n1 + 1):
			rtn += '0'
		for i in range(n3 + 1):
			rtn += '1'
		for i in range(n2 - 1):
			if i % 2 == 0:
				rtn += '0'
			else:
				rtn += '1'
		print(rtn)
		continue


typen1 = '01' * 200
for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	res = ''
	if n0 > 0:
		res += '0' * (n0 + 1)
	if n1 > 0:
		if n0 > 0:
			res += '1'
			res += typen1[:n1 - 1]
		else:
			res += typen1[:n1 + 1]
	if n2 > 0:
		if len(res) == 0 or res[-1] == '0':
			res = res[:len(res) - 1]
			res = '1' + res
			res += '1' * n2
		else:
			res += '1' * n2
	print(res)


num_cases = int(input())
for case in range(num_cases):
	(zeroes, alts, ones) = [int(n) for n in input().split()]
	string = ''
	if zeroes > 0:
		string = '0' * (zeroes + 1)
	if ones > 0:
		string += '1' * (ones + 1)
	if string == '':
		string += '01'
		alts -= 1
	elif zeroes > 0 and ones > 0:
		alts -= 1
	last_char = string[-1]
	if last_char == '0':
		next = '1'
	else:
		next = '0'
	while alts > 0:
		string += next
		alts -= 1
		if next == '0':
			next = '1'
		else:
			next = '0'
	print(string)


def foo(m):
	if m % 2 == 1:
		return m + 1
	else:
		k = m // 2
		return 2 * k + 1
t = int(input())
for tt in range(t):
	abc = input().split()
	a = int(abc[0])
	b = int(abc[1])
	c = int(abc[2])
	if b == 0:
		if a == 0:
			print(foo(c) * '1')
		else:
			print(foo(a) * '0')
	else:
		ans = ''
		tmp = foo(a)
		ans += '0' * tmp
		ans += '1'
		for i in range(c):
			ans += '1'
		flag = 0
		for i in range(b - 1):
			ans += str(flag)
			flag = 1 - flag
		print(ans)


t = int(input())
for _ in range(t):
	(n0, n1, n2) = map(int, input().split())
	s = ''
	if n1 % 2 == 1:
		r = n1 + 1 >> 1
		s = '01' * r
		s = '0' * n0 + s
		s = s + '1' * n2
	elif n1 > 0:
		r = n1 >> 1
		if n0 > 0:
			s = '10' * r
			s = s + '0' * n0 + '1'
			s = '1' * n2 + s
		else:
			s = '01' * r
			s = s + '1' * n2 + '0'
			s = '0' * n0 + s
	else:
		s = ''
		if n0 > 0:
			s = '0' * (n0 + 1)
		if n2 > 0:
			s = s + '1' * (n2 + 1)
	print(s)


T = int(input())
for t in range(T):
	(n0, n1, n2) = map(int, input().split())
	result = ''
	result += '0' * (0 if n0 == 0 and n1 == 0 else n0 + 1) + '1' * (0 if n2 == 0 and n1 == 0 else n2 + 1)
	n1 -= 1
	while n1 > 0:
		result += '1' if result[-1] == '0' else '0'
		n1 -= 1
	print(result)


def main():
	t = int(input())
	for _ in range(t):
		(a, b, c) = map(int, input().split())
		s = ''
		f1 = 0
		f2 = 0
		f3 = 0
		if a > 0:
			f1 = 1
			s += '00'
			a -= 1
			s += '0' * a
		if b > 0:
			f2 = 1
			if f1 == 1:
				s += '1'
				b -= 1
				if b % 2 == 1:
					if c > 0:
						s += '1' * c
						c = 0
					for i in range(b):
						if i % 2 == 0:
							s += '0'
						else:
							s += '1'
				else:
					for i in range(b):
						if i % 2 == 0:
							s += '0'
						else:
							s += '1'
					if c > 0:
						s += '1' * c
						c = 0
			else:
				s += '01'
				b -= 1
				if b % 2 == 1:
					if c > 0:
						s += '1' * c
						c = 0
					for i in range(b):
						if i % 2 == 0:
							s += '0'
						else:
							s += '1'
				else:
					for i in range(b):
						if i % 2 == 0:
							s += '0'
						else:
							s += '1'
					if c > 0:
						s += '1' * c
						c = 0
		if c > 0:
			s += '11'
			c -= 1
			s += '1' * c
		print(s)
	return
main()


import io
import os
from collections import Counter, defaultdict, deque
DEBUG = False

def solve(N0, N1, N2):
	if N1 > 0 and N1 % 2 == 0:
		temp = solve(N0, N1 - 1, N2)
		assert temp[0] == '0'
		ans = '1' + temp
	else:
		s0 = '0' * N0 + '0'
		s1 = '01' * (N1 // 2)
		if N1 % 2 == 0:
			s1 += '0'
		elif N1 % 2 == 1:
			s1 += '01'
		assert len(s1) == N1 + 1
		s2 = '1' * N2 + '1'
		if N1 == 0:
			if N0:
				ans = s0
			else:
				assert N2
				ans = s2
		else:
			ans = s0[1:] + s1 + s2[1:]
	if DEBUG:
		print(N0, N1, N2, ans)
		counts = Counter()
		for (x, y) in zip(ans, ans[1:]):
			counts[int(x), int(y)] += 1
		assert counts[0, 0] == N0
		assert counts[0, 1] + counts[1, 0] == N1
		assert counts[1, 1] == N2
	return ans
if DEBUG:
	for i in range(5):
		for j in range(5):
			for k in range(5):
				if i + j + k > 0:
					if i and j == 0 and k:
						continue
					solve(i, j, k)
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
T = int(input())
for t in range(T):
	(N0, N1, N2) = [int(x) for x in input().split()]
	ans = solve(N0, N1, N2)
	print(ans)


from sys import stdin
input = stdin.readline
for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	if a == 0 and c == 0:
		if b == 1:
			print('01')
		else:
			s = '01' * ((b + 1) // 2)
			if b % 2 == 0:
				s = '1' + s
			print(s)
	elif a and b and c:
		b -= 1
		print('1' * (b % 2) + '0' * (a + 1) + '1' * (c + 1) + '01' * (b // 2))
	elif b and c and (not a):
		print('0' * (b % 2) + '1' * (c + 1) + '01' * (b // 2))
	elif a and b and (not c):
		print('1' * (b % 2) + '0' * (a + 1) + '10' * (b // 2))
	elif c and (not b) and (not a):
		print('1' * (c + 1))
	elif a and (not b) and (not c):
		print('0' * (a + 1))


from sys import stdin, stdout
import math, sys, heapq
from itertools import permutations, combinations
from collections import defaultdict, deque, OrderedDict
from os import path
import random
import bisect as bi

def yes():
	print('YES')

def no():
	print('NO')
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

	def I():
		return int(input())

	def In():
		return map(int, input().split())
else:

	def I():
		return int(stdin.readline())

	def In():
		return map(int, stdin.readline().split())

def dict(a):
	d = {}
	for x in a:
		if d.get(x, -1) != -1:
			d[x] += 1
		else:
			d[x] = 1
	return d

def find_gt(a, x):
	i = bi.bisect_left(a, x)
	if i != len(a):
		return i
	else:
		return -1

def main():
	try:
		(a, b, c) = In()
		an = ''
		if c:
			for i in range(c + 1):
				an += '1'
		if len(an):
			q = 0
			temp = ''
			for j in range(b):
				if q:
					temp += '1'
					q = 0
				else:
					temp += '0'
					q = 1
			temp = temp[::-1]
			an = temp + an
		else:
			q = 0
			temp = ''
			for j in range(b + 1):
				if q:
					temp += '1'
					q = 0
				else:
					temp += '0'
					q = 1
			an = temp[::-1]
		if len(an) and a:
			temp = []
			for j in range(a):
				temp.append('0')
			if an[0] == '1':
				an = list(an)
				an[0] = '0'
				temp[0] = '1'
				an = temp + an
				an = ''.join(an)
			else:
				an = ''.join(temp) + an
		elif a != 0:
			temp = ''
			for j in range(a + 1):
				temp += '0'
			an = temp + an
		print(an)
	except:
		pass
M = 998244353
P = 1000000007
for _ in range(I()):
	main()


t = int(input())
for _ in range(t):
	(n0, n1, n2) = list(map(int, input().split()))
	a = []
	if n1 > 0:
		for i in range(n0 + 1):
			a.append('0')
		for i in range(n2 + 1):
			a.append('1')
		if n1 == 1:
			print(''.join(a))
			continue
		elif n1 > 0:
			n1 -= 1
			q = n1 // 2
			r = n1 % 2
			for i in range(q):
				a.append('01')
			for i in range(r):
				a.append('0')
			print(''.join(a))
			continue
		else:
			print(''.join(a))
	else:
		if n0 == 0:
			a.append('1')
		else:
			a.append('0')
		for i in range(n0):
			a.append('0')
		for i in range(n2):
			a.append('1')
		print(''.join(a))


def solve():
	(n0, n1, n2) = map(int, input().split())
	ans = []
	if n1 == 0:
		if n0:
			for i in range(n0 + 1):
				ans.append('0')
		if n2:
			for i in range(n2 + 1):
				ans.append('1')
	else:
		for i in range(n1):
			ans.append('0' if i % 2 == 0 else '1')
		if n1 % 2 == 0:
			for i in range(n2):
				ans.append('1')
			ans.append('0')
			for i in range(n0):
				ans.append('0')
		else:
			for i in range(n0):
				ans.append('0')
			ans.append('1')
			for i in range(n2):
				ans.append('1')
	print(''.join(map(str, ans)))
t = int(input())
while t > 0:
	t -= 1
	solve()


t = int(input())
answers = []
for _ in range(t):
	(n0, n1, n2) = [int(i) for i in input().split()]
	if n1 == 0:
		if n2 == 0:
			answers.append('0' * (n0 + 1))
		else:
			answers.append('1' * (n2 + 1))
	else:
		starter = '10'
		last = 0
		for i in range(n1 - 1):
			starter += str(1 - last)
			last = 1 - last
		pref = '1' * n2
		if n1 % 2 == 0:
			suff = '0' * n0
			answers.append(pref + starter[:-1] + suff + starter[-1])
		else:
			suff = '0' * n0
			answers.append(pref + starter + suff)
print(*answers, sep='\n')


for _ in range(int(input())):
	(n1, n2, n3) = list(map(int, input().split()))
	ans = ''
	if n1 > 0:
		ans += '0'
		for i in range(n1):
			ans += '0'
	if n3 > 0:
		if n1 > 0:
			n2 -= 1
		ans += '1'
		for i in range(n3):
			ans += '1'
	if n2 > 0:
		if ans == '':
			ans += '1'
		last = 0
		if ans[-1] == '0':
			last = 1 ^ last
		for i in range(n2):
			ans += str(last)
			last = last ^ 1
	print(ans)


import sys
import os
import time
import collections
from collections import Counter, deque
import itertools
import math
import timeit
import random
import string

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=1):
	divisors = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				divisors.append(i)
			else:
				divisors.extend([i, n // i])
	return divisors

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def flin(d, x, default=-1):
	left = right = -1
	for i in range(len(d)):
		if d[i] == x:
			if left == -1:
				left = i
			right = i
	if left == -1:
		return (default, default)
	else:
		return (left, right)

def ceil(n, k):
	return n // k + (n % k != 0)

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def prr(a, sep=' '):
	print(sep.join(map(str, a)))

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)
input = sys.stdin.readline
for _ in range(ii()):
	(a, b, c) = mi()
	sa = [0] * (a + 1)
	sc = [1] * (c + 1)
	if b == 0:
		if a != 0:
			prr(sa, '')
		else:
			prr(sc, '')
		continue
	c = 0
	for i in range(b - 1):
		sc.append(c)
		c = 1 - c
	print(''.join(map(str, sa)), end='')
	print(''.join(map(str, sc)))


def solve(n_0, n_1, n_2):
	if n_1 == 0:
		if n_0 != 0:
			return [0 for i in range(n_0 + 1)]
		else:
			return [1 for i in range(n_2 + 1)]
	result = []
	if n_1 % 2 == 0:
		result.append(1)
	result.append(0)
	for i in range(n_0):
		result.append(0)
	m = (n_1 - 1) // 2
	for i in range(m):
		result.append(1)
		result.append(0)
	if result[-1] == 0:
		m = n_2 + 1
	else:
		m = n_2
	for i in range(m):
		result.append(1)
	return result

def main():
	t = int(input())
	for i in range(t):
		(n_0, n_1, n_2) = map(int, input().split())
		result = solve(n_0, n_1, n_2)
		print(''.join(map(str, result)))
	return 0
main()


import sys, random
from bisect import bisect_left, bisect_right
input = sys.stdin.readline

def main():
	inf = 10 ** 20
	t = int(input())
	for _ in range(1, t + 1):
		n = [int(x) for x in input().split()]
		if n[1]:
			ans = '01' * ((n[1] + 1) // 2)
			if not n[1] & 1:
				ans += '0'
			ans = '0' * n[0] + ans[0] + '1' * n[2] + ans[1:]
			print(ans)
		else:
			if n[0]:
				print('0' * (n[0] + 1))
			if n[2]:
				print('1' * (n[2] + 1))
main()


for i in range(int(input())):
	(a, b, c) = map(int, input().split())
	ans = ''
	if a > 0:
		ans += '0' * (a + 1)
	if c > 0:
		ans += '1' * (c + 1)
	if a > 0 and c > 0:
		b -= 2
	elif a > 0 or c > 0:
		b -= 1
	one = '0'
	two = '1'
	if b >= 0:
		if len(ans) > 0 and ans[-1] == '0':
			one = '1'
			two = '0'
		for i in range(b + 1):
			if i % 2 == 0:
				ans += one
			else:
				ans += two
	print(ans)


t = int(input())
for i in range(t):
	(no, n1, n2) = map(int, input().split())
	if no == 0 and n2 == 0:
		if n1 == 1:
			print('01')
		elif n1 % 2 == 0:
			print(int(n1 / 2) * '01' + '0')
		else:
			print((int(n1 / 2) + 1) * '01')
	else:
		if no == 0:
			answerno = ''
		else:
			answerno = (no + 1) * '0'
		if n1 == 0:
			answern1 = ''
		elif no == 0:
			if n1 == 1:
				answern1 = '0'
			elif n1 % 2 == 0:
				answern1 = int(n1 / 2) * '01'
			else:
				answern1 = int(n1 / 2) * '01' + '0'
		elif n1 % 2 == 0:
			answern1 = (int(n1 / 2) - 1) * '01' + '0'
		else:
			answern1 = int(n1 / 2) * '01'
		if n2 == 0:
			answern2 = ''
			if n1 == 1:
				answern1 = '1'
			elif n1 % 2 == 0:
				answern1 = int(n1 / 2) * '10'
			else:
				answern1 = int(n1 / 2) * '10' + '1'
		else:
			answern2 = (n2 + 1) * '1'
		print(answerno + answern2 + answern1)


def solution(n0, n1, n2):
	if n1 == 0:
		assert n2 == 0 or n0 == 0
		if n2 == 0:
			print('0' * (n0 + 1))
			return
		if n0 == 0:
			print('1' * (n2 + 1))
			return
	if n0 == 0 and n2 == 0:
		print(''.join([str(i % 2) for i in range(n1 + 1)]))
		return
	if n0 == 0:
		print('1' * (n2 + 1) + ''.join([str(i % 2) for i in range(n1)]))
		return
	if n2 == 0:
		print('0' * (n0 + 1) + ''.join([str((i + 1) % 2) for i in range(n1)]))
		return
	if n1 % 2 == 1:
		print('0' * (n0 + 1) + ''.join([str((i + 1) % 2) for i in range(n1)]) + '1' * n2)
		return
	if n0 >= n2:
		print('001' + '1' * n2 + ''.join([str(i % 2) for i in range(n1 - 1)]) + '0' * (n0 - 1))
		return
	else:
		print('110' + '0' * n0 + ''.join([str((i + 1) % 2) for i in range(n1 - 1)]) + '1' * (n2 - 1))
		return
inp = int(input())
for _ in range(inp):
	(n0, n1, n2) = tuple(map(int, input().split()))
	solution(n0, n1, n2)


for _ in [0] * int(input()):
	(a, b, p) = map(int, input().split())
	if b < 1:
		r = '0' * (a + 1) * (a > 0) + '1' * (p + 1) * (p > 0)
	else:
		r = '1' * p + '1' + '0' * a + '0' + ('10' * b)[:b - 1] * (b > 1)
	print(r)


t = int(input())
while t > 0:
	(n0, n1, n2) = [int(ele) for ele in input().split()]
	s = ''
	if n2 != 0:
		s += '1' * (n2 + 1)
	if n0 != 0:
		s += '0' * (n0 + 1)
	if n0 != 0 and n2 != 0:
		n1 -= 1
		flag = 0
		while n1 > 0:
			if flag == 0:
				flag = 1
				s += '1'
			else:
				flag = 0
				s += '0'
			n1 -= 1
	elif n2 != 0:
		flag = 1
		while n1 > 0:
			if flag == 1:
				s += '0'
				flag = 0
			else:
				flag = 1
				s += '1'
			n1 -= 1
	elif n0 != 0:
		flag = 0
		while n1 > 0:
			if flag == 0:
				flag = 1
				s += '1'
			else:
				flag = 0
				s += '0'
			n1 -= 1
	else:
		s = '10'
		n1 -= 1
		flag = 0
		while n1 > 0:
			if flag == 0:
				flag = 1
				s += '1'
			else:
				flag = 0
				s += '0'
			n1 -= 1
	print(s)
	t -= 1


import sys
for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	s = ''
	if a > 0:
		for i in range(a + 1):
			s += '0'
	if a == 0 and b > 0:
		for i in range(b + 1):
			if i % 2 == 0:
				s += '1'
			else:
				s += '0'
	else:
		for i in range(b):
			if i % 2 == 0:
				s += '1'
			else:
				s += '0'
	if c > 0 and len(s) > 0 and (s[-1] == '0'):
		s = s[:-1]
		if s[0] == '0':
			s = '1' + s
		else:
			s = '0' + s
	if not s:
		for i in range(c + 1):
			s += '1'
	else:
		for i in range(c):
			s += '1'
	print(s)


import sys
input = sys.stdin.readline
from math import log2, log, ceil

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def nCr(n, k):
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return res

def upper_bound(a, x, lo=0):
	hi = len(a)
	while lo < hi:
		mid = (lo + hi) // 2
		if a[mid] < x:
			lo = mid + 1
		else:
			hi = mid
	return lo

def primefs(n):
	primes = {}
	while n % 2 == 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime
MAXN = int(1000000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def factoriazation(x):
	ret = {}
	while x != 1:
		ret[spf[x]] = ret.get(spf[x], 0) + 1
		x = x // spf[x]
	return ret

def int_array():
	return list(map(int, input().strip().split()))

def str_array():
	return input().strip().split()
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
for _ in range(int(input())):
	(a, b, c) = int_array()
	ans = []
	if a > 0:
		for i in range(a + 1):
			ans.append('0')
	if c > 0:
		if len(ans) != 0:
			b -= 1
			ans.append('1')
			for i in range(c):
				ans.append('1')
		else:
			for i in range(c + 1):
				ans.append('1')
	if b > 0:
		if len(ans) == 0:
			ans.append('1')
		for i in range(b):
			if ans[-1] == '1':
				ans.append('0')
			else:
				ans.append('1')
	print(''.join(ans))


for _ in range(int(input())):
	(a, b, c) = [int(x) for x in input().split(' ')]
	if b == 0:
		if c == 0:
			print('0' * (a + 1))
		else:
			print('1' * (c + 1))
	else:
		s = '01'
		b = b - 1
		t = '0'
		for i in range(b):
			s += t
			if t == '0':
				t = '1'
			else:
				t = '0'
		if s[-1] != '0':
			for i in range(c):
				s += '1'
			for i in range(a):
				s = '0' + s
		else:
			for i in range(a):
				s = '0' + s
			s = s[:-1]
			for i in range(c):
				s = s + '1'
			s += '0'
		print(s)


for _ in range(int(input())):
	(n0, n1, n2) = [int(x) for x in input().split()]
	ans = ''
	if n2 > 0:
		ans += '1'
	for _ in range(n2):
		ans += '1'
	p = int(0)
	if n2 == 0 and n1 > 0:
		ans += '1'
	for _ in range(int(int((n1 + 1) / 2) * 2 - 1)):
		ans += str(p)
		p = 1 ^ p
	if n1 == 0 and n0 > 0:
		ans += '0'
	for _ in range(n0):
		ans += '0'
	if n1 % 2 == 0 and n1 > 0:
		ans += '1'
	print(ans)


num_cases = int(input())
for _ in range(num_cases):
	(n0, n1, n2) = tuple([int(x) for x in input().split(' ')])
	s = ''
	if n1 % 2 == 0 and n1 > 0:
		s += '0'
		n1 -= 1
	s2 = ''
	s1 = ''
	s0 = ''
	for _ in range(n2):
		if len(s2) == 0:
			s2 += '11'
		else:
			s2 += '1'
	if len(s2) == 0 and n1 > 0:
		s2 += '1'
	for _ in range(n1):
		if len(s1) == 0 or s1[-1] == '1':
			s1 += '0'
		else:
			s1 += '1'
	if len(s1) == 0 and n0 > 0:
		s1 += '0'
	for _ in range(n0):
		s0 += '0'
	s = '%s%s%s%s' % (s, s2, s1, s0)
	print(s)


for _ in range(int(input())):
	(N0, N1, N2) = map(int, input().split())
	S = ''
	if N0:
		S += '0' * (N0 + 1)
	if N2:
		S += '1' * (N2 + 1)
	if N1:
		if N0 and N2:
			N1 -= 1
		if N0:
			S = '01' * (N1 // 2) + S
			if N1 % 2:
				S = '1' + S
		elif N2:
			S += '01' * (N1 // 2)
			if N1 % 2:
				S += '0'
		else:
			S = '01' * ((N1 + 1) // 2)
			if N1 % 2 == 0:
				S += '0'
	print(S)


def build(n):
	if n[1] == 0:
		if n[0] > 0:
			return '0' * (n[0] + 1)
		else:
			return '1' * (n[2] + 1)
	s = '01' * ((n[1] + 1) // 2) + ('0' if n[1] % 2 == 0 else '')
	return s.replace('0', '0' * (n[0] + 1), 1).replace('1', '1' * (n[2] + 1), 1)
cases = int(input().strip())
for _ in range(cases):
	n = list(map(int, input().strip().split()))
	print(build(n))


import sys
readline = sys.stdin.readline
t = int(input())
for _ in range(t):
	(n0, n1, n2) = map(int, readline().split())
	ans = [0] * (n0 + 1 if n0 else 0) + [1] * (n2 + 1 if n2 else 0)
	if ans and ans[0] == 0 and (ans[-1] == 1):
		n1 -= 1
	stripe = [0, 1] if not ans or ans[-1] == 1 else [1, 0]
	if ans:
		ans += stripe * ((n1 + 1) // 2)
		if n1 and n1 & 1:
			ans.pop()
	else:
		ans = stripe * (n1 // 2 + 1)
		if n1 & 1 == 0:
			ans.pop()
	print(*ans, sep='')


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	if y == 0:
		if x == 0:
			print('1' * (z + 1))
		if z == 0:
			print('0' * (x + 1))
	else:
		ans = ['0' * (x + 1), '1' * (z + 1)]
		for i in range(y - 1):
			ans.append(str(i & 1))
		print(''.join(ans))


from sys import stdin, setrecursionlimit, stdout
from collections import deque
from math import sqrt, floor, ceil, log, log2, log10, pi, gcd, sin, cos, asin

def ii():
	return int(stdin.readline())

def fi():
	return float(stdin.readline())

def mi():
	return map(int, stdin.readline().split())

def fmi():
	return map(float, stdin.readline().split())

def li():
	return list(mi())

def lsi():
	x = list(stdin.readline())
	x.pop()
	return x

def si():
	return stdin.readline().rstrip()
res = ['YES', 'NO']
test_case = ii()
while test_case:
	test_case -= 1
	(a, b, c) = mi()
	if b and (not b % 2):
		print(1, end='')
		b -= 1
	if b:
		print('0' * a + '01' * ((b + 1) // 2) + '1' * c)
	elif a and c:
		print('0' * (a + 1) + '1' * (c + 1))
	elif a:
		print('0' * (a + 1))
	elif c:
		print('1' * (c + 1))


t = int(input())
while t:
	(n0, n1, n2) = list(map(int, input().split(' ')))
	l = []
	if n1 == 0:
		if n0 != 0:
			l.extend([0 for i in range(n0 + 1)])
		if n2 != 0:
			l.extend([1 for i in range(n2 + 1)])
	else:
		for i in range(n1 + 1):
			if i % 2 == 0:
				l.append(0)
			else:
				l.append(1)
		i_0 = len(l) - 1 - l[::-1].index(0)
		for i in range(n0):
			l.insert(i_0 + 1, 0)
		i_1 = len(l) - 1 - l[::-1].index(1)
		for i in range(n2):
			l.insert(i_1 + 1, 1)
	for i in l:
		print(i, end='')
	print()
	t -= 1


def read_int():
	return int(input())

def read_ints():
	return map(int, input().split(' '))
t = read_int()
for case_num in range(t):
	(a, b, c) = read_ints()
	if b == 0:
		if a > 0:
			print('0' * (a + 1))
		else:
			print('1' * (c + 1))
	else:
		mid = ('01' * b)[:b + 1]
		left = '0' * a
		if b % 2 == 1:
			right = '1' * c
			print(left + mid + right)
		else:
			print(left + mid[0] + '1' * c + mid[1:])


def main():
	(n0, n1, n2) = map(int, input().split())
	if n1 == 0:
		if n0 != 0:
			print((n0 + 1) * '0')
		else:
			print((n2 + 1) * '1')
		return
	line = '10'
	n1 -= 1
	while n1 >= 2:
		line += '10'
		n1 -= 2
	if n1 == 1:
		line = '0' + line
	if line[0] == '1':
		line = n2 * '1' + line
		if line[-1] == '1':
			line = line[0:-1] + n0 * '0' + '1'
		else:
			line = line + n0 * '0'
	else:
		line = n0 * '0' + line
		if line[-1] == '0':
			line = line[0:-1] + n2 * '1' + '0'
		else:
			line = line + n2 * '1'
	print(line)
t = int(input())
for i in range(t):
	main()


for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	ans = []
	if b == 0:
		if c:
			ans += [1] * (c + 1)
		if a:
			ans += [0] * (a + 1)
	else:
		y = 0
		while b + 1:
			if y:
				ans += [0]
				y = 0
			else:
				ans += [1]
				y = 1
			b -= 1
		ans = [1] + [0] * a + ans[1:]
		ans = [1] * c + ans
	print(''.join([str(i) for i in ans]))


for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	if n1 == 0:
		if n2 > 0:
			print('1' * (n2 + 1))
		elif n0 > 0:
			print('0' * (n0 + 1))
		continue
	ans = []
	if n2:
		ans += [1] * (n2 + 1)
	if n0:
		ans += [0] * (n0 + 1)
	ans = ans or [0]
	if n2 and n0:
		n1 -= 1
	for i in range(n1):
		ans.append(1 - ans[-1])
	print(*ans, sep='')


n0 = '0'
n2 = '1'
t = int(input())
for _ in range(t):
	output = ''
	(a, b, c) = map(int, input().split())
	if c:
		output += n2 * (c + 1)
	if output:
		for i in range(b):
			output += str(i % 2)
	elif b:
		for i in range(b + 1):
			output += str(i % 2)
	if output:
		if output[-1] == '0':
			output += n0 * a
		else:
			output = output[:-1] + n0 * a + '1'
	else:
		output += n0 * (a + 1)
	print(output)


z = int(input())
for _ in range(z):
	(a, b, c) = map(int, input().split())
	if b == 0:
		if a:
			print('0' * (a + 1))
		else:
			print('1' * (c + 1))
	else:
		s = ''
		if a:
			s += '0' * (a + 1)
		if c:
			s += '1' * (c + 1)
		if a > 0 and c > 0:
			b -= 1
		if s == '':
			s = '0'
		while b:
			if s[-1] == '0':
				s += '1'
			else:
				s += '0'
			b -= 1
		print(s)


t = int(input())
for _ in range(t):
	l1 = input().split(' ')
	n0 = int(l1[0])
	n1 = int(l1[1])
	n2 = int(l1[2])
	l = ['1']
	c = 0
	if n1 == 0:
		if n0 == 0:
			print('1' * (n2 + 1))
		else:
			print('0' * (n0 + 1))
	else:
		for i in range(n1):
			if c == 0:
				l += str(c)
				c = 1
			else:
				l += str(c)
				c = 0
		if n0 != 0:
			l[1] += '0' * n0
		if n2 != 0:
			l[0] += '1' * n2
		ans = ''
		for i in l:
			ans += i
		print(ans)


def solve():
	(n0, n1, n2) = map(int, input().split())
	if n1 == 0:
		if n0 > 0:
			print('0' * (n0 + 1))
		if n2 > 0:
			print('1' * (n2 + 1))
		return
	ans = ''
	for i in range(n1 + 1):
		if i % 2 == 0:
			ans += '1'
		else:
			ans += '0'
	ans = insertzero(ans, n0)
	ans = insertone(ans, n2)
	print(ans)

def insertzero(s, n):
	ans = s[:1] + '0' * n + s[1:]
	return ans

def insertone(s, n):
	return '1' * n + s
t = int(input())
while t:
	t -= 1
	solve()


n = int(input())
for test in range(n):
	(n0, n01, n1) = map(int, input().split())
	l = []
	if n01 > 0:
		for i in range(n0 + 1):
			l.append('0')
		for i in range(n1 + 1):
			l.append('1')
		for i in range(n01 - 1):
			if l[-1] == '0':
				l.append('1')
			else:
				l.append('0')
		print(''.join(l))
	elif n0 == 0:
		print(''.join('1' * (n1 + 1)))
	else:
		print(''.join('0' * (n0 + 1)))


for T in range(int(input())):
	(n0, n1, n2) = list(map(int, input().split()))
	if n1 > 0:
		res = '0' * (n0 + 1) + '1' * (n2 + 1) + ''.join([str(1 & i) for i in range(n1 - 1)])
		print(res)
	else:
		if n0:
			res = '0' * (n0 + 1)
		else:
			res = '1' * (n2 + 1)
		print(res)


for t in range(int(input())):
	(n0, n1, n2) = list(map(int, input().split()))
	ans = ''
	if n1 > 0:
		ans = '01' * ((n1 + 1) // 2) + '0' * ((n1 + 1) % 2)
	if n0:
		if ans:
			ans = '0' * n0 + ans
		else:
			ans = '0' * (n0 + 1)
	if n2:
		if ans and ans[-1] == '1':
			ans += '1' * n2
		elif len(ans) > 1 and ans[-2] == '1':
			ans = ans[:-1] + '1' * n2 + '0'
		else:
			ans += '1' * (n2 + 1)
	print(ans)


for _ in range(int(input())):
	(n1, n2, n3) = map(int, input().split())
	a = []
	t = True
	if n2 == 0:
		if n1 == 0:
			print('1' * (n3 + 1))
		else:
			print('0' * (n1 + 1))
	else:
		for i in range(n2 + 1):
			if t:
				a.append(1)
				t = False
			else:
				a.append(0)
				t = True
		i0 = a.index(0)
		for i in range(n1):
			a.insert(i0, 0)
		i1 = a.index(1)
		for i in range(n3):
			a.insert(i1, 1)
		for i in range(len(a)):
			print(a[i], end='')
		print()


x = int(input())
list1 = []
d = ''
for i in range(x):
	(a, b, c) = map(int, input().split())
	if a == 0 and b == 0:
		list1.append((c + 1) * '1')
	elif c == 0 and b == 0:
		list1.append((a + 1) * '0')
	elif b % 2 == 0:
		list1.append(a * '0' + int(b / 2) * '01' + c * '1' + '0')
	else:
		list1.append(a * '0' + int((b + 1) / 2) * '01' + c * '1')
for i in list1:
	print(i)


for t in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	s = []
	if n1 == 0:
		if n0 != 0:
			s = [0] * (n0 + 1)
		else:
			s = [1] * (n2 + 1)
	else:
		s = [1] * (n2 + 1)
		a = [0] * (n0 + 1)
		s.extend(a)
		x = 1
		for i in range(n1 - 1):
			s.append(x)
			if x == 1:
				x = 0
			else:
				x = 1
	print(*s, sep='')


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from itertools import *
import bisect
from heapq import *
from math import *
from copy import *
from collections import deque
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
from types import GeneratorType

def iterative(f, stack=[]):

	def wrapped_func(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		to = f(*args, **kwargs)
		while True:
			if type(to) is GeneratorType:
				stack.append(to)
				to = next(to)
				continue
			stack.pop()
			if not stack:
				break
			to = stack[-1].send(to)
		return to
	return wrapped_func
mod = 1000000007

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

def lcm(a, b):
	return a * b // gcd(a, b)

def power(a, b):
	ans = 1
	while b > 0:
		if b % 2 == 1:
			ans *= a
		a *= a
		b //= 2
	return ans

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(max(n - r, 1)))

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def solve():
	(n0, n1, n2) = sep()
	if n1 == 0:
		if n0 > 0 and n2 == 0:
			print('0' * (n0 + 1))
		elif n0 == 0 and n2 > 0:
			print('1' * (n2 + 1))
		else:
			assert False
	else:
		print(''.join(['0' * (n0 + 1), '1' * (n2 + 1)] + [str(i & 1) for i in range(n1 - 1)]))
testcase(int(inp()))


from collections import Counter
import math
mod = 10 ** 9 + 7
for i in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	s = ''
	if n1 == 0 and n2 == 0:
		for i in range(n0 + 1):
			s += '0'
	elif n0 == 0 and n1 == 0:
		for i in range(n2 + 1):
			s += '1'
	elif n1 == 1:
		for i in range(n0 + 1):
			s += '0'
		for i in range(n2 + 1):
			s += '1'
	else:
		if (n1 - 2) % 2 != 0:
			s += '0'
		for i in range(1, (n1 - 2) // 2 + 1, 1):
			s += '10'
		s += '1'
		for i in range(n0 + 1):
			s += '0'
		s += '1'
		for i in range(1, n2 + 1):
			s += '1'
	print(s)


n = int(input())
for i in range(n):
	(a, b, c) = list(map(int, input().split(' ')))
	ans = ''
	if a == c == 0:
		if b > 0:
			ans += '0'
			for i in range(b):
				if i % 2 == 0:
					ans += '1'
				else:
					ans += '0'
	elif a == 0:
		ans += '1'
		for i in range(c):
			ans += '1'
		for i in range(b):
			if i % 2 == 0:
				ans += '0'
			else:
				ans += '1'
	elif c == 0:
		ans += '0'
		for i in range(a):
			ans += '0'
		for i in range(b):
			if i % 2 == 0:
				ans += '1'
			else:
				ans += '0'
	else:
		b -= 1
		ans += '0'
		for i in range(a):
			ans += '0'
		ans += '1'
		for i in range(c):
			ans += '1'
		for i in range(b):
			if i % 2 == 0:
				ans += '0'
			else:
				ans += '1'
	print(ans)


t = int(input())
for t in range(t):
	(n0, n1, n2) = [int(i) for i in input().split(' ')]
	ans = ''
	extra0 = extra1 = 1
	if n1 == 0:
		extra0 = extra1 = 0
		if n0 > 0:
			extra0 = 1
		else:
			extra1 = 1
	ans += '0' * (n0 + extra0)
	ans += '1' * (n2 + extra1)
	for i in range(n1 - 1):
		ans += str(i % 2)
	print(ans)


import sys
for _ in range(int(input())):
	l = list(map(int, input().split()))
	s = ''
	if l[0] > 0:
		s += '0' * l[0]
		s += '0'
	if l[2] > 0:
		s += '1' * l[2]
		s += '1'
	if l[1] > 0:
		if l[0] > 0 and l[2] > 0:
			l[1] -= 1
			while l[1] > 0:
				s += str(int(s[-1]) ^ 1)
				l[1] -= 1
		elif l[0] > 0 or l[2] > 0:
			while l[1] > 0:
				s += str(int(s[-1]) ^ 1)
				l[1] -= 1
		else:
			temp = '1'
			while l[1] > 0:
				temp += str(int(temp[-1]) ^ 1)
				l[1] -= 1
			s += temp
	print(s)


for _ in range(int(input())):
	s1 = ''
	s0 = ''
	s10 = ''
	(a, b, c) = map(int, input().split())
	s1 = '1' * c
	s0 = '0' * a
	toggle = 0
	if b > 0:
		s10 += '1'
		for x in range(b):
			if toggle == 0:
				s10 += '0'
			elif toggle == 1:
				s10 += '1'
			toggle = 1 - toggle
	if b == 0:
		if a == 0:
			print(s1 + '1')
		else:
			print(s0 + '0')
	elif b % 2 == 1:
		print(s1 + s10 + s0)
	else:
		print(s1 + s10[:-1] + s0 + '1')


for _ in range(int(input())):
	(N00, N01, N11) = map(int, input().split())
	(n00, n01, n11) = (N00, N01, N11)
	res = ''
	if n00:
		res += '0' * (n00 + 1)
	if n11:
		res += '1' * (n11 + 1)
	if n00 and n11 and n01:
		n01 -= 1
	if not res and n01:
		res += '0'
	for _ in range(n01):
		res += '1' if res[-1] == '0' else '0'
	zipped = [a + b if a == '0' else b + a for (a, b) in zip(res[1:], res)]
	assert zipped.count('01') == N01
	assert zipped.count('11') == N11
	assert zipped.count('00') == N00
	print(res)


t = int(input())
for _ in range(t):
	l = input().split()
	n0 = int(l[0])
	n1 = int(l[1])
	n2 = int(l[2])
	if n0 == 0 and n1 == 0:
		for i in range(n2 + 1):
			print(1, end='')
		print('')
		continue
	if n1 == 0 and n2 == 0:
		for i in range(n0 + 1):
			print(0, end='')
		print('')
		continue
	ans = []
	for i in range(n2 + 1):
		ans.append(1)
	for i in range(n0 + 1):
		ans.append(0)
	k = 1
	x = 1
	while k < n1:
		ans.append(x)
		k = k + 1
		x = 1 - x
	for i in ans:
		print(i, end='')
	print('')


t = int(input())
for i in range(t):
	(n0, n1, n2) = map(int, input().split())
	s = ''
	st = 1
	if n0 > 0:
		s += '0' * (n0 + 1)
	if n2 > 0:
		s += '1' * (n2 + 1)
		st = 0
	if n0 != 0 and n2 != 0:
		n1 -= 1
	if n0 == n2 == 0:
		s += '0'
	while n1 > 0:
		s += str(st)
		st = int(not bool(st))
		n1 -= 1
	print(s)


for u in range(int(input())):
	(x, y, z) = map(int, input().split())
	if y == 0:
		if x == 0:
			print('1' * (z + 1))
		elif z == 0:
			print('0' * (x + 1))
	else:
		s = '1' * (z + 1) + '0' * (x + 1)
		k = '10' * y
		print(s + k[:y - 1])


t = int(input())
for _ in range(t):
	n = list()
	(a, b, c) = [int(x) for x in input().split()]
	if a != 0:
		for _ in range(a + 1):
			n.append('0')
		if c != 0:
			for _ in range(c + 1):
				n.append('1')
			for x in range(b - 1):
				if x % 2 == 0:
					n.append('0')
				else:
					n.append('1')
		else:
			for x in range(b):
				if x % 2 == 0:
					n.append('1')
				else:
					n.append('0')
	elif c != 0:
		for _ in range(c + 1):
			n.append('1')
		for x in range(b):
			if x % 2 == 0:
				n.append('0')
			else:
				n.append('1')
	elif b % 2 == 0:
		for _ in range(b // 2):
			n.append('0')
			n.append('1')
		n.append('0')
	else:
		for _ in range((b + 1) // 2):
			n.append('0')
			n.append('1')
	print(''.join(n))


T = int(input())
for t in range(T):
	(n0, n1, n2) = list(map(int, input().split()))
	res = []
	if n1:
		res = ['1'] * n2 + ['10'] * ((n1 + 1) // 2) + ['0'] * n0
		if n1 % 2 == 0:
			res = ['0'] + res
	elif n0:
		res = ['0'] * (n0 + 1)
	elif n2:
		res = ['1'] * (n2 + 1)
	print(''.join(res))


t = int(input())
for _ in range(0, t):
	(n0, n1, n2) = map(int, input().split())
	s = ''
	if n0 != 0:
		s += '0' * (n0 + 1)
	if n2 != 0:
		s += '1' * (n2 + 1)
	if n1 != 0:
		cc = ['0', '1']
		if n0 != 0 and n2 != 0:
			n1 -= 1
		elif n0 != 0 and n2 == 0:
			cc = ['1', '0']
		elif n0 == 0 and n2 == 0:
			s += '1'
		ss = 0
		while n1 != 0:
			s += cc[ss % 2]
			n1 -= 1
			ss += 1
	print(s)


from sys import stdin

def main():
	inp = stdin.readline
	for _ in range(int(inp())):
		(a, b, c) = map(int, inp().split())
		d = []
		if a > 0:
			d.append('0' * (a + 1))
		if b > 0:
			if b % 2 == 0:
				if len(d) == 0:
					d.append('1')
				else:
					d = ['1'] + d + ['1']
					b -= 2
				f = True
			else:
				if len(d) == 0:
					d.append('0')
				f = False
			for i in range(b):
				if f:
					d.append('0')
				else:
					d.append('1')
				f = not f
		if c > 0:
			if len(d) == 0:
				d.append('1')
			elif d[-1] == '0':
				d.append('1')
			for i in range(c):
				d.append('1')
		print(''.join(d))
main()


from sys import stdin, stdout

def main():
	for _ in range(int(stdin.readline())):
		(n1, n2, n3) = map(int, stdin.readline().split())
		lis = []
		if n1 == 0 and n2 == 0:
			for i in range(n3 + 1):
				lis.append('1')
		elif n3 == 0 and n2 == 0:
			for i in range(n1 + 1):
				lis.append('0')
		elif n1 == 0 and n3 == 0:
			if n2 % 2 == 0:
				for i in range(n2 // 2):
					lis.append('01')
				lis.append('0')
			else:
				for i in range((n2 + 1) // 2):
					lis.append('01')
		elif n1 == 0:
			for i in range(n3):
				lis.append('1')
			if n2 % 2 == 0:
				for i in range(n2 // 2):
					lis.append('10')
				lis.append('1')
			else:
				for i in range((n2 + 1) // 2):
					lis.append('10')
		else:
			for i in range(n3 + 1):
				lis.append('1')
			for i in range(n1 + 1):
				lis.append('0')
			if n2 % 2 == 0:
				for i in range((n2 - 1) // 2):
					lis.append('10')
				lis.append('1')
			else:
				for i in range((n2 - 1) // 2):
					lis.append('10')
		print(''.join(lis))
main()


t = int(input())
for _ in range(t):
	(x, y, z) = tuple(map(int, input().split()))
	if y == 0:
		if x > 0:
			print(*[0] * (x + 1), sep='')
		else:
			print(*[1] * (z + 1), sep='')
		continue
	ret = [0] * (x + 1)
	ret.extend([1, 0] * ((y - 1) // 2))
	ret.extend([1] * (z + 1))
	ret.extend([0] * ((y - 1) % 2))
	print(*ret, sep='')


from collections import defaultdict
for _ in range(int(input())):
	(n1, n2, n3) = map(int, input().split())
	ans = '0' * n1 + '01' * ((n2 + 1) // 2) + '1' * n3
	if n2 > 0 and n2 % 2 == 0:
		ans = ans + '0'
	if n3 == n2 == 0:
		ans = '0' * (n1 + 1)
	elif n2 == n1 == 0:
		ans = '1' * (n3 + 1)
	print(ans)


for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	s = ''
	if a > 0:
		s += '0' * (a + 1)
	if c > 0:
		s += '1' * (c + 1)
	if b > 0:
		if a > 0 and c > 0:
			v = 0
			while b - 1 > 0:
				s += str(v)
				v ^= 1
				b -= 1
		elif a > 0:
			v = 1
			while b > 0:
				s += str(v)
				v ^= 1
				b -= 1
		elif c > 0:
			v = 0
			while b > 0:
				s += str(v)
				v ^= 1
				b -= 1
		else:
			v = 1
			while b + 1 > 0:
				s += str(v)
				v ^= 1
				b -= 1
	print(s)


t = int(input())
for i in range(t):
	(r, k, n) = [int(i) for i in input().split()]
	f = 1
	s = ''
	if k == 0:
		if n == 0:
			print('0' * (r + 1))
		else:
			print('1' * (n + 1))
		continue
	for i in range(k + 1):
		if f == 1:
			s = s + '1'
			f = 0
		else:
			s = s + '0'
			f = 1
	s1 = s
	for i in range(k, -1, -1):
		if s[i] == '1':
			s1 = s[:i] + '1' * n + s[i:]
			break
	for i in range(len(s1)):
		if s1[i] == '0':
			s1 = s1[:i] + '0' * r + s1[i:]
			break
	print(s1)


def solve(n0, n1, n2):
	s = ''
	f = False
	if n0 > 0:
		s += '00'
		s += '0' * (n0 - 1)
	if n1 > 0:
		if n0 == 0 and n1 != 0:
			s += '0'
		s += '1'
		s += '01' * ((n1 - 1) // 2)
		if n1 % 2 == 0:
			f = True
	if n2 > 0:
		s += '1'
		s += '1' * (n2 - 1)
		if n1 == 0 and n2 != 0:
			s += '1'
	if f:
		s += '0'
	print(s)
t = int(input())
for _ in range(t):
	(n0, n1, n2) = map(int, input().split())
	solve(n0, n1, n2)


for _ in range(int(input())):
	(s, t, u) = map(int, input().split())
	if t == 0:
		if s > 0:
			ans = '0' * (s + 1)
		else:
			ans = '1' * (u + 1)
	else:
		ans = '1' * (u + 1)
		ans += '01' * ((t - 1) // 2)
		ans += '0' * (s + 1)
		if t % 2 == 0:
			ans += '1'
	print(ans)


from queue import deque
t = int(input())
for _ in range(t):
	(n0, n1, n2) = map(int, input().split())
	if n0 == n1 == 0:
		print('1' * (n2 + 1))
	elif n1 == n2 == 0:
		print('0' * (n0 + 1))
	else:
		ans = '0' * (n0 + 1) + '1' * (n2 + 1)
		for i in range(n1 - 1):
			ans += str(i % 2)
		print(ans)


t = int(input())
while t != 0:
	(n0, n1, n2) = map(int, input().split())
	p = ''
	if n0 > 0:
		p += '0' * n0 + '0'
	if n2 > 0:
		p += '1' * n2 + '1'
	if n2 > 0 and n0 > 0:
		n1 -= 1
		while n1 > 0:
			p += '0'
			n1 -= 1
			if n1 > 0:
				p += '1'
				n1 -= 1
	elif n2 > 0:
		while n1 > 0:
			p += '0'
			n1 -= 1
			if n1 > 0:
				p += '1'
				n1 -= 1
	elif n0 > 0:
		while n1 > 0:
			p += '1'
			n1 -= 1
			if n1 > 0:
				p += '0'
				n1 -= 1
	else:
		n1 += 1
		while n1 > 0:
			p += '1'
			n1 -= 1
			if n1 > 0:
				p += '0'
				n1 -= 1
	print(p)
	t -= 1


def solution(t):
	for i in range(t):
		n = input().split()
		(n0, n1, n2) = (int(n[0]), int(n[1]), int(n[2]))
		s = n0 + n1 + n2
		end = ''
		if n1 == 1 and n0 and n2 or n1 == 0:
			end = ''
		elif n2 == 0 and n0 and n1:
			for i in range(n1):
				end += '0' if i % 2 else '1'
		elif n0 == 0 and n1 and n2:
			for i in range(n1):
				end += '1' if i % 2 else '0'
		elif n1 and n0 == 0 and (n2 == 0):
			end = '01' * (n1 // 2 + 1) if n1 % 2 else '01' * (n1 // 2) + '0'
		elif (n1 - 1) % 2 == 0:
			end = '01' * ((n1 - 1) // 2)
		elif (n1 - 1) % 2:
			end = '0' + '10' * ((n1 - 1) // 2)
		if n0:
			n0 += 1
		if n2:
			n2 += 1
		print('0' * n0 + '1' * n2 + end)
solution(int(input()))


def abc(x):
	a = 0
	b = 0
	c = 0
	for i in range(1, len(x)):
		m = int(x[i]) + int(x[i - 1])
		if m == 0:
			a += 1
		elif m == 1:
			b += 1
		else:
			c += 1
	return (a, b, c)
t = int(input())
e = 10 ** 9 + 7
for _ in range(t):
	(a, b, c) = map(int, input().split())
	if a == 0 and b == 0 and (c == 0):
		print('')
		continue
	if a == 0 and b == 0:
		x = '1' * (c + 1)
		print(x)
		continue
	if b == 0 and c == 0:
		x = '0' * (a + 1)
		print(x)
		continue
	if a == 0 and c == 0:
		if b % 2:
			x = '01' * (b // 2 + 1)
		else:
			x = '01' * (b // 2) + '0'
		print(x)
		continue
	x = '0' * (a + 1)
	x = x + '10' * ((b - 1) // 2) + '1'
	x = x + '1' * c
	if not b % 2:
		x = x + '0'
	print(x)


def task(a, b, c):
	s = ''
	if a > 0:
		s += '0' * (a + 1)
	if b > 0 and a > 0:
		s += '1'
		b -= 1
	if c > 0:
		if a == 0:
			s += '1' * (c + 1)
		else:
			s += '1' * c
	if b > 0:
		if a == 0 and c == 0:
			s += '01'
			b -= 1
		s += '01' * (b // 2)
		b -= 2 * (b // 2)
		if b == 1:
			s += '0'
			b -= 1
	print(s)
t = int(input())
for i in range(0, t):
	(a, b, c) = map(int, input().split())
	task(a, b, c)


t = int(input())

def test(n0, n1, n2, ans):
	strs = []
	for answer in ans:
		m = [0, 0, 0]
		for i in range(1, len(answer)):
			c = answer[i - 1:i + 1].count('1')
			m[c] += 1
		if m[0] != n0 or m[1] != n1 or m[2] != n2:
			return 'Failed'
	return 'Passed'
for _ in range(t):
	(n0, n1, n2) = map(int, input().split())
	ans = []
	visited = set()
	f = [False]

	def sol(n0, n1, n2, le, path):
		if f[0]:
			return
		if (n0, n1, n2, le) in visited:
			return
		visited.add((n0, n1, n2, le))
		if n0 == 0 and n1 == 0 and (n2 == 0):
			f[0] = True
			ans.append(path)
			return
		if n0 < 0 or n1 < 0 or n2 < 0:
			return False
		if le == 0:
			sol(n0 - 1, n1, n2, 0, path + '0')
			sol(n0, n1 - 1, n2, 1, path + '1')
		else:
			sol(n0, n1, n2 - 1, 1, path + '1')
			sol(n0, n1 - 1, n2, 0, path + '0')
	sol(n0, n1, n2, 0, '0')
	sol(n0, n1, n2, 1, '1')
	print(ans[0])


t = int(input())
while t:
	(n0, n1, n2) = map(int, input().split())
	if n0 and n1 and n2:
		if n1 % 2:
			print('0' * (n0 + 1) + '10' * ((n1 - 1) // 2) + '1' * (n2 + 1))
		else:
			print('10' + '0' * n0 + '10' * ((n1 - 2) // 2) + '1' * (n2 + 1))
	elif n0 and n1:
		if n1 % 2:
			print('10' + '0' * n0 + '10' * ((n1 - 1) // 2))
		else:
			print('0' * (n0 + 1) + '10' * (n1 // 2))
	elif n1 and n2:
		if n1 % 2:
			print('1' * n2 + '10' * ((n1 + 1) // 2))
		else:
			print('10' * (n1 // 2) + '1' * (n2 + 1))
	elif n0:
		print('0' * (n0 + 1))
	elif n2:
		print('1' * (n2 + 1))
	elif n1 % 2:
		print('01' * ((n1 + 1) // 2))
	else:
		print('01' * (n1 // 2) + '0')
	t -= 1


t = int(input())
for _ in range(t):
	(a, b, c) = map(int, input().split())
	s1 = '0' * a
	if b == 0 and a > 0:
		s1 += '0'
	s3 = '1' * c
	if b == 0 and c > 0:
		s3 += '1'
	if b > 0 and b % 2 == 0:
		s3 += '0'
	if b == 1:
		s2 = '01'
	else:
		s2 = '01' * ((b + 1) // 2)
	print(s1 + s2 + s3)


T = int(input())
for _ in range(0, T):
	(n1, n2, n3) = map(int, input().split())
	s = ''
	for i in range(n1 + 1):
		s += '0'
	for i in range(n3 + 1):
		s += '1'
	turn = 0
	for i in range(n2 - 1):
		if turn == 0:
			turn = 1
			s += '0'
		else:
			turn = 0
			s += '1'
	if n1 == 0 and n2 == 0:
		s = s[1:]
	elif n2 == 0 and n3 == 0:
		s = s[:len(s) - 1]
	print(s)


import math
import sys
from collections import defaultdict, Counter, deque, OrderedDict
import bisect
input = iter(sys.stdin.buffer.read().decode().splitlines()).__next__
ilele = lambda : map(int, input().split())
alele = lambda : list(map(int, input().split()))

def list2d(a, b, c):
	return [[c] * b for i in range(a)]
from itertools import accumulate, groupby
import sys
for _ in range(int(input())):
	(a, b, c) = ilele()
	s2 = '01' * b
	s2 = s2[:b + 1]
	if c == 0:
		s3 = ''
	else:
		s3 = '1' * (c + 1)
	if a == 0:
		s1 = ''
	else:
		s1 = '0' * (a + 1)
	if s1 == '':
		s4 = s2
	elif s2 == '':
		s4 = s1
	else:
		s4 = s1[1:] + s2
	if s4 == '':
		print(s3)
	elif s3 == '':
		print(s4)
	elif s4[-1] == '1':
		print(s4 + s3[:-1])
	else:
		print(s4[:-1] + s3[1:] + '0')


def resolve():
	t = int(input())
	for _ in range(t):
		(a, b, c) = map(int, input().split())
		if a == 0 and b == 0:
			print('1' * (c + 1))
			continue
		if c == 0 and b == 0:
			print('0' * (a + 1))
			continue
		ans = '0' * (a + 1)
		ans += '10' * ((b + 1) // 2 - 1)
		ans += '1' * (c + 1)
		if b % 2 == 0:
			ans += '0'
		print(ans)
resolve()


t = int(input())

def sequence(zero, mix, unit):
	if mix == 0:
		if zero == 0:
			return '1' * (unit + 1)
		else:
			return '0' * (zero + 1)
	s = '0' * zero
	if mix % 2 == 1:
		s += '01' * ((mix + 1) // 2)
		s += '1' * unit
	else:
		s += '01' * (mix // 2)
		if unit > 0:
			s += '1' * unit
		s += '0'
	return s
for _ in range(t):
	(zero, mix, unit) = map(int, input().split())
	print(sequence(zero, mix, unit))


t = int(input())
for _ in range(t):
	(n0, n1, n2) = map(int, input().split())
	if n1 == 0:
		if n0:
			print('0' * (n0 + 1))
		else:
			print('1' * (n2 + 1))
	else:
		ans = '0' * (n0 + 1) + '1' * (n2 + 1)
		(d, m) = divmod(n1 - 1, 2)
		ans += '01' * d
		if m:
			ans += '0'
		print(ans)


t = int(input())
while t > 0:
	s = input().split()
	n1 = int(s[0])
	n2 = int(s[1])
	n3 = int(s[2])
	ans = ''
	if n2 > 0 and n2 % 2 == 0:
		ans += '10'
		while n1 > 0:
			ans += '0'
			n1 -= 1
		ans += '1'
		n2 -= 2
		while n2 > 0:
			ans += '01'
			n2 -= 2
		while n3 > 0:
			ans += '1'
			n3 -= 1
	elif n2 > 0 and n2 % 2 != 0:
		while n1 >= 0:
			ans += '0'
			n1 -= 1
		ans += '1'
		n2 -= 1
		while n2 > 0:
			ans += '01'
			n2 -= 2
		while n3 > 0:
			ans += '1'
			n3 -= 1
	elif n1 > 0:
		while n1 >= 0:
			ans += '0'
			n1 -= 1
	else:
		while n3 >= 0:
			ans += '1'
			n3 -= 1
	print(ans)
	t -= 1


for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	(s2, s0, s1) = ('1' * (n2 + 1), '0' * (n0 + 1), '10' * 100)
	if n1 == 0:
		if n2 == 0:
			print(s0)
		else:
			print(s2)
		continue
	s = s1[:n1 + 1]
	ans = '' + s2 + s0 + s[2:]
	print(ans)


t = int(input())
while t:
	t = t - 1
	(a, b, c) = map(int, input().split())
	s = ''
	if a != 0:
		for w in range(a + 1):
			s += '0'
	if c != 0:
		for w in range(c + 1):
			s += '1'
	if a != 0 and c != 0:
		b -= 1
	if s == '':
		s += '0'
	for w in range(b):
		if s != '' and s[-1] == '1':
			s += '0'
		else:
			s += '1'
	print(s)


t = int(input())
for i in range(t):
	abc = list(map(int, input().split()))
	counter = 0
	string = ''
	if abc[2] != 0:
		string += (int(abc[2]) + 1) * str(1)
		counter += 1
	if abc[0] != 0:
		string += (int(abc[0]) + 1) * str(0)
		counter += 1
	flag = True
	if counter == 2:
		counter = 1
		flag = True
	elif counter == 1:
		if abc[0]:
			flag = True
			counter = 0
		else:
			flag = False
			counter = 0
	elif counter == 0:
		string += str(1)
		flag = False
		counter = 0
	while counter < int(abc[1]):
		if flag:
			string += str(1)
			flag = False
			counter += 1
			continue
		if not flag:
			string += str(0)
			flag = True
			counter += 1
	print(string)


from bisect import bisect_left as bl
from bisect import bisect_right as br
from heapq import heappush, heappop
import math
from collections import *
from functools import reduce, cmp_to_key, lru_cache
import io, os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
M = mod = 10 ** 9 + 7

def factors(n):
	return sorted(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def inv_mod(n):
	return pow(n, mod - 2, mod)

def li():
	return [int(i) for i in input().rstrip().split()]

def st():
	return str(input().rstrip())[2:-1]

def val():
	return int(input().rstrip())

def li2():
	return [str(i)[2:-1] for i in input().rstrip().split()]

def li3():
	return [int(str(i)[2:-1]) for i in input().rstrip()]
for _ in range(val()):
	(n1, n2, n3) = li()
	s = [1]
	if n2:
		ans = '1'
		for i in range(n2):
			s.append(1 - s[-1])
		ind1 = s.index(1)
		s = s[:ind1] + [1] * n3 + s[ind1:]
		ind2 = s.index(0)
		s = s[:ind2] + [0] * n1 + s[ind2:]
	elif n1:
		s = [0] * (n1 + 1)
	else:
		s = [1] * (n3 + 1)
	print(*s, sep='')


n = int(input())
for i in range(0, n):
	l = input()
	(n1, n2, n3) = map(int, l.split(' '))
	str_ = ''
	if n2 == 0:
		if n1 > 0:
			str_ = str_ + '0' * (n1 + 1)
		else:
			str_ = str_ + '1' * (n3 + 1)
	else:
		i = 1
		while i < n2 + 1:
			str_ = str_ + str((i + 1) % 2)
			i = i + 1
		str_ = '1' + '0' * n1 + str_
		str_ = '1' * n3 + str_
	print(str_)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
testcases = int(input())
for j in range(testcases):
	(n0, n1, n2) = map(int, input().split())
	const = ''
	if n2 > 0:
		for s in range(n2 + 1):
			const += '1'
	parity = 0
	if n0 > 0:
		for s in range(n0 + 1):
			const += '0'
	if n1 > 0:
		if n2 > 0 and n0 > 0:
			if const[-1] == '0':
				for s in range(n1 - 1):
					if parity == 0:
						const += '1'
					else:
						const += '0'
					parity = (parity + 1) % 2
			elif const[-1] == '1':
				for s in range(n1 - 1):
					if parity == 0:
						const += '0'
					else:
						const += '1'
					parity = (parity + 1) % 2
		elif len(const) > 0:
			if const[-1] == '0':
				for s in range(n1):
					if parity == 0:
						const += '1'
					else:
						const += '0'
					parity = (parity + 1) % 2
			elif const[-1] == '1':
				for s in range(n1):
					if parity == 0:
						const += '0'
					else:
						const += '1'
					parity = (parity + 1) % 2
		else:
			for s in range(n1 + 1):
				if parity == 0:
					const += '1'
				else:
					const += '0'
				parity = (parity + 1) % 2
	print(const)


t = int(input())
for i in range(0, t):
	(n1, n2, n3) = map(int, input().split(' '))
	string1 = ''
	j = 0
	while j < n2 + 1 and n2 != 0:
		if j % 2 == 0:
			string1 = string1 + '0'
		else:
			string1 = string1 + '1'
		j = j + 1
	string0 = ''
	for i in range(0, n1):
		string0 = string0 + '0'
	string2 = ''
	for i in range(0, n3):
		string2 = string2 + '1'
	if string1 != '':
		if len(string1) % 2 == 0:
			string = string0 + string1 + string2
		else:
			string = string0 + string1[0:1] + string2 + string1[1:len(string1)]
	elif string0 != '':
		string0 = string0 + '0'
		string = string0
	else:
		string2 = string2 + '1'
		string = string2
	print(string)


t = int(input())
for i in range(t):
	(a, b, c) = map(int, input().split())
	zeros = 0
	zero_ones = 0
	ones = 0
	addend = False
	if a > 0:
		if b == 0 and c == 0:
			zeros = a + 1
		elif c == 0:
			zeros = a
			zero_ones = b + 1
		else:
			zeros = a
			zero_ones = b
			ones = c
			if b % 2 == 1:
				zero_ones += 1
			else:
				addend = True
	elif c > 0:
		if b == 0:
			ones = c + 1
		else:
			zero_ones = b
			ones = c
			if b % 2 == 1:
				zero_ones += 1
			else:
				addend = True
	else:
		zero_ones = b + 1
	bridge = ''
	for i in range(zero_ones):
		if i % 2 == 0:
			bridge += '0'
		else:
			bridge += '1'
	ans = '0' * zeros + bridge + '1' * ones
	if addend:
		ans += '0'
	print(ans)


t = int(input())
for _ in range(t):
	(n0, n1, n2) = map(int, input().split())
	if n1 != 0:
		s = []
		s += [0] * (n0 + 1)
		s += [1, 0] * ((n1 - 1) // 2)
		s += [1] * (n2 + 1)
		if n1 % 2 == 0:
			s += [0]
	else:
		s = []
		if n0:
			s += [0] * (n0 + 1)
		if n2:
			s += [1] * (n2 + 1)
	print(*s, sep='')


def init_sting(zeros, switches, ones):
	if zeros:
		current_sting = '0' * (zeros + 1)
		zeros = 0
	elif ones:
		current_sting = '1' * (ones + 1)
		ones = 0
	else:
		current_sting = '01'
		switches -= 1
	return (current_sting, zeros, switches, ones)

def solve(current_sting, zeros, switches, ones):
	if not current_sting:
		current_sting = solve(*init_sting(zeros, switches, ones))
	elif zeros:
		current_sting += '0' * (zeros + 1)
		zeros = 0
		switches -= 1
		current_sting = solve(current_sting, zeros, switches, ones)
	elif ones:
		current_sting += '1' * (ones + 1)
		ones = 0
		switches -= 1
		current_sting = solve(current_sting, zeros, switches, ones)
	elif switches:
		current_sting += '1' == current_sting[-1] and '0' or '1'
		switches -= 1
		current_sting = solve(current_sting, zeros, switches, ones)
	return current_sting
n = int(input())
inputs = []
for i in range(0, n):
	new_line = [int(x) for x in input().split(' ')]
	inputs.append(new_line)
for i in range(0, n):
	new_line = inputs[i]
	print(solve('', new_line[0], new_line[1], new_line[2]))


import collections
import operator
for _ in range(int(input())):
	(n, k, m) = [int(i) for i in input().split(' ')]
	s = ''
	while m + k + n > 0:
		if s == '':
			if m > 0:
				s += '11'
				m -= 1
			elif n > 0:
				s += '00'
				n -= 1
			else:
				s += '10'
				k -= 1
		elif s[-1] == '1':
			if m > 0:
				s += '1'
				m -= 1
			else:
				s += '0'
				k -= 1
		elif n > 0:
			s += '0'
			n -= 1
		else:
			s += '1'
			k -= 1
	print(s)


for _ in range(int(input())):
	(n1, n2, n3) = map(int, input().split())
	n2 = [n2, n2 - 1][n1 > 0 and n3 > 0]
	n2 = [n2, n2 + 1][n1 == 0 and n3 == 0]
	n1 = [n1, -1][n1 == 0]
	n3 = [n3, -1][n3 == 0]
	r = '0' * (n1 + 1) + '1' * (n3 + 1)
	if n3 > 0:
		for i in range(n2):
			r += ['0', '1'][i % 2 == 1]
	else:
		for i in range(n2):
			r += ['1', '0'][i % 2 == 1]
	print(r)


t = int(input())
for _ in range(t):
	(a, b, c) = map(int, input().split())
	ans = ''
	if a > 0:
		ans += '00' + '0' * (a - 1)
	if c > 0:
		ans += '11' + '1' * (c - 1)
	if a > 0 and c > 0 and (b > 1):
		ans += '01' * ((b - 1) // 2) + '0' * ((b - 1) % 2)
	elif a == 0 and c == 0:
		ans += '10' * ((b + 1) // 2) + '1' * ((b + 1) % 2)
	elif a == 0 and b > 0:
		ans += '01' * (b // 2) + '0' * (b % 2)
	elif c == 0 and b > 0:
		ans += '10' * (b // 2) + '1' * (b % 2)
	print(ans)


from sys import stdin, stdout
from itertools import accumulate
for _ in range(int(stdin.readline())):
	(n0, n1, n2) = list(map(int, stdin.readline().split()))
	ans = '1' * (n2 + 1) + '0' * (n0 + 1)
	if n0 != 0 and n2 != 0:
		n1 -= 1
		last = '0'
		while n1 > 0:
			ans += '1' if last == '0' else '0'
			last = ans[-1]
			n1 -= 1
		print(ans)
	else:
		if n2:
			ans = '1' * (n2 + 1)
			last = '1'
			while n1 > 0:
				ans += '1' if last == '0' else '0'
				last = ans[-1]
				n1 -= 1
		elif n0:
			ans = '0' * (n0 + 1)
			last = '0'
			while n1 > 0:
				ans += '1' if last == '0' else '0'
				last = ans[-1]
				n1 -= 1
		else:
			ans = ''
			last = '0'
			while n1 >= 0:
				ans += '1' if last == '0' else '0'
				last = ans[-1]
				n1 -= 1
		print(ans)


for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	if n2 != 0:
		print('1' * (n2 + 1), end='')
	elif n1 != 0:
		print('1', end='')
	now = 0
	for _ in range(n1 - 1):
		if now == 0:
			now = 1
			print(0, end='')
		else:
			now = 0
			print(1, end='')
	if n1 != 0 and now == 0:
		print('0' * (n0 + 1))
	elif n1 != 0 and now == 1:
		print('0' * n0, end='')
		print('1')
	elif n1 == 0:
		if n0 == 0:
			print()
		else:
			print('0' * (n0 + 1))


n = int(input())
for _ in range(n):
	(n0, n1, n2) = list(map(int, input().split()))
	if n1 == 0:
		if n0 > 0:
			print('0' * (n0 + 1))
		elif n2 > 0:
			print('1' * (n2 + 1))
		else:
			print()
		continue
	print('0', end='')
	print('0' * n0, end='')
	for i in range(n1):
		print(1 - i % 2, end='')
		if i == 0:
			print('1' * n2, end='')
	print()


from sys import stdin, gettrace
if not gettrace():

	def input():
		return next(stdin)[:-1]

def main():

	def solve():
		(n0, n1, n2) = map(int, input().split())
		res = []
		if n0 > 0:
			res.append('0' * (n0 + 1))
		if n2 > 0:
			res.append('1' * (n2 + 1))
		if n0 > 0 and n2 > 0:
			n1 -= 1
		if n0 == 0 and n2 == 0:
			n1 += 1
		if n2 > 0:
			res.append('01' * (n1 // 2))
			if n1 % 2 == 1:
				res.append('0')
		else:
			res.append('10' * (n1 // 2))
			if n1 % 2 == 1:
				res.append('1')
		print(''.join(res))
	q = int(input())
	for _ in range(q):
		solve()
main()


for i in range(int(input())):
	(a, b, c) = map(int, input().split())
	if b == 0:
		if a == 0:
			print('1' * (c + 1))
		elif c == 0:
			print('0' * (a + 1))
		else:
			continue
		continue
	mid = ''
	for i in range(b + 1):
		if i % 2 == 0:
			mid += '1'
		else:
			mid += '0'
	last = mid[-1]
	mid = mid[:-1]
	print('1' * c + mid + '0' * a + last)


for i in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	(a, b, c) = ('', '', '')
	if n2 > 0:
		a = '11' + '1' * (n2 - 1)
	if n0 > 0:
		b = '00' + '0' * (n0 - 1)
	if n2 > 0 and n0 > 0:
		c = a + b + '10' * ((n1 - 1) // 2) + '1' * ((n1 - 1) % 2)
	elif n0 > 0:
		c = a + b + '10' * (n1 // 2) + '1' * (n1 % 2)
	elif n2 > 0:
		c = a + '01' * (n1 // 2) + '0' * (n1 % 2)
	else:
		c = '10' + '10' * ((n1 - 1) // 2) + '1' * ((n1 - 1) % 2)
	print(c)


for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	st = ''
	if c > 0:
		st += '1' * (c + 1)
	if b > 0:
		if len(st) > 0:
			times = b // 2
			rem = b - times * 2
			st += '01' * times
			if rem != 0:
				st += '0'
		elif b % 2 == 1:
			st += '01' * ((b + 1) // 2)
		else:
			st += '01' * (b // 2)
			st += '0'
	if a > 0:
		if len(st) > 0:
			if st[-1] == '0':
				st += '0' * a
			else:
				st = st[0:len(st) - 2]
				st += '0' * (a + 1)
				st += '1'
		else:
			st += '0' * (a + 1)
	print(st)


no_tests = int(input())
for i in range(no_tests):
	res_str = ''
	(n0, n1, n2) = [int(i) for i in input().split()]
	if n1 == 0:
		if n0 != 0:
			print('0' * (n0 + 1))
		else:
			print('1' * (n2 + 1))
		continue
	res_str = f"{res_str}{'1' * (n2 + 1)}"
	res_str = '' if n1 == 0 and n2 == 0 else res_str
	res_str = f"{res_str}{'01' * (n1 // 2)}"
	res_str = f"{res_str[:-1]}{'0' * n0}1" if n1 % 2 == 0 else f"{res_str}{'0' * (n0 + 1)}"
	print(res_str)


import os
import sys
from io import BytesIO, IOBase

def solution(n0, n1, n2):
	if n1 == 0:
		if n2 == 0:
			write('0' * (n0 + 1))
		elif n1 == 0:
			write('1' * (n2 + 1))
		else:
			write('0' * (n0 + 1) + '1' * (n2 + 1))
		return
	if n1 & 1:
		mid = '10' * (n1 // 2 + 1)
	else:
		mid = '10' * (n1 // 2) + '1'
	res = mid[0] + '0' * n0 + mid[1:]
	res = '1' * n2 + res
	write(res)

def main():
	for _ in range(r_int()):
		(n0, n1, n2) = r_array()
		solution(n0, n1, n2)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')

def write(*args, end='\n'):
	for x in args[:-1]:
		sys.stdout.write(str(x) + ' ')
	sys.stdout.write(str(args[-1]))
	sys.stdout.write(end)

def r_array():
	return [int(x) for x in input().split()]

def r_int():
	return int(input())
main()


t = int(input())
for you in range(t):
	l = input().split()
	n0 = int(l[0])
	n1 = int(l[1])
	n2 = int(l[2])
	if n0 == 0 and n1 == 0:
		for i in range(n2 + 1):
			print(1, end='')
		print()
	elif n1 == 0 and n2 == 0:
		for i in range(n0 + 1):
			print(0, end='')
		print()
	elif n1 % 2 == 0:
		for i in range(n1 // 2):
			print('01', end='')
		for i in range(n2):
			print('1', end='')
		for i in range(n0 + 1):
			print('0', end='')
		print()
	else:
		for i in range(n2):
			print('1', end='')
		for i in range((n1 + 1) // 2):
			print('10', end='')
		for i in range(n0):
			print('0', end='')
		print()


for _ in range(int(input())):
	(n1, n2, n3) = map(int, input().split())
	l = []
	if n2 == 0 and n3 == 0:
		for i in range(n1 + 1):
			l.append('0')
		print(''.join(l))
		continue
	elif n1 == 0 and n3 == 0:
		c = 0
		for i in range(n2 + 1):
			l.append(str(c % 2))
			c += 1
		print(''.join(l))
		continue
	elif n1 == 0 and n2 == 0:
		for i in range(n3 + 1):
			l.append('1')
		print(''.join(l))
		continue
	for i in range(n1):
		l.append('0')
	c = 0
	for i in range(n2 + n2 % 2):
		l.append(str(c % 2))
		c += 1
	for i in range(n3):
		l.append('1')
	if n2 % 2 == 0:
		l.append('0')
	print(''.join(l))


from collections import deque
from collections import OrderedDict
import math
import sys
import os
from io import BytesIO
import threading
import bisect
for t in range(int(input())):
	(n1, n2, n3) = map(int, input().split())
	if n1 == 0 and n2 == 0:
		for i in range(n3 + 1):
			print(1, end='')
		print('\n', end='')
		continue
	str1An = []
	for i in range(n1 + 1):
		str1An.append('0')
	charOne = '1'
	lastZero = False
	for i in range(n2):
		if charOne == '1':
			str1An.append('1')
			charOne = '0'
		else:
			if i == n2 - 1:
				lastZero = True
				break
			str1An.append('0')
			charOne = '1'
	for i in range(n3):
		str1An.append('1')
	if lastZero == True:
		str1An.append('0')
	for i in range(len(str1An)):
		print(str1An[i], end='')
	print('\n', end='')


for i in range(int(input())):
	(a, b, c) = map(int, input().split())
	s = ''
	if a == 0 and b == 0:
		s3 = '1'
		print(s3 * (c + 1))
		continue
	if b == 0 and c == 0:
		s3 = '0'
		print(s3 * (a + 1))
		continue
	s1 = '0' * (a + 1)
	s3 = '1' * (c + 1)
	s += s1
	s += s3
	ctr = 0
	s2 = ''
	if s.find('01') >= 1:
		ctr += 1
	if b > ctr:
		for j in range(2, b + 1):
			if j % 2 == 0:
				s2 += '0'
			else:
				s2 += '1'
	s += s2
	print(s)


t = int(input())
for tt in range(t):
	(n0, n1, n2) = [int(i) for i in input().split(' ')]
	if n1 == 0:
		if n0 > 0:
			print('0' * (n0 + 1))
		if n2 > 0:
			print('1' * (n2 + 1))
	else:
		s = [i % 2 for i in range(n1 + 1)]
		s = [0] + [1] * n2 + s[1:]
		s = [0] * n0 + s
		print(str(s)[1:-1].replace(', ', ''))


from math import ceil

def solve(n0, n1, n2):
	if n1 % 2 == 0:
		if n1 != 0:
			print('1' + '0' * (n0 + 1) + '10' * ((n1 - 2) // 2) + '1' + '1' * n2)
		elif n2 == 0:
			print('0' * (n0 + 1))
		else:
			print('1' * (n2 + 1))
	else:
		print('0' * n0 + '01' * ceil(n1 / 2) + '1' * n2)
for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	solve(a, b, c)


T = int(input())
n = [0] * T
ns = [0] * T
for t in range(T):
	ns[t] = [int(i) for i in input().split(' ')]

def ans(ns):
	a = []
	if ns[0] > 0:
		a += ['0'] * (ns[0] + 1)
	elif ns[1] > 0:
		a += ['0']
	if ns[1] > 1:
		a += ['10'] * ((ns[1] - 1) // 2)
	if ns[2] > 0:
		a += ['1'] * (ns[2] + 1)
	elif ns[1] > 0:
		a += ['1']
	if ns[1] % 2 == 0 and ns[1] != 0:
		a += ['0']
	return ''.join(a)
for t in range(T):
	print(ans(ns[t]))


from math import gcd, ceil
from collections import defaultdict as dd

def lcm(a, b):
	return a * b // gcd(a, b)

def inin():
	return int(input())

def inar():
	return list(map(int, input().split()))

def ar(element, size):
	return [element for i in range(size)]

def digitsum(num):
	su = 0
	while num:
		su += num % 10
		num //= 10
	return su

def pred(n, k, pointer):
	return pointer - k >= n
for i in range(inin()):
	(n00, n01, n11) = inar()
	if n01 == 0:
		if n00 == 0:
			print('1' * (n11 + 1))
		else:
			print('0' * (n00 + 1))
	else:
		string = ''
		for i in range(n00 + 1):
			string += '0'
		for i in range(n11 + 1):
			string += '1'
		for i in range(n01 - 1):
			string += str(i % 2)
		print(string)


import collections

def solve(n0, n1, n2):
	ans = []
	if n1 == 0:
		if n0:
			ans = [0 for _ in range(n0 + 1)]
		if n2:
			ans = [1 for _ in range(n2 + 1)]
	else:
		for i in range(n1 + 1):
			if i & 1:
				ans.append(0)
			else:
				ans.append(1)
		for i in range(n0):
			ans.insert(1, 0)
		for i in range(n2):
			ans.insert(0, 1)
	return ''.join(map(str, ans))
t = int(input().strip())
for i in range(t):
	[n0, n1, n2] = list(map(int, input().strip().split()))
	print(solve(n0, n1, n2))


T = int(input())
for _ in range(T):
	(n0, n1, n2) = map(int, input().split())
	answer = ''
	if n1 == 0:
		if n0:
			answer = '0' * (n0 + 1)
		else:
			answer = '1' * (n2 + 1)
	else:
		answer = '10' * (n1 // 2 + n1 % 2)
		if n1 % 2 == 0:
			answer += '1'
		answer = answer[0] + '0' * n0 + answer[1:]
		answer = '1' * n2 + answer
	print(answer)


for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	s = ''
	if n0 > 0 and n2 > 0:
		if n1 % 2 == 0:
			n1 -= 1
			s = '1'
		alt = ''.join(['0' if i % 2 == 0 else '1' for i in range(n1)])
		s += '0' * n0 + alt + '1' * (n2 + 1)
	elif n0 > 0:
		s = '0' * (n0 + 1)
		s += ''.join(['1' if i % 2 == 0 else '0' for i in range(n1)])
	elif n2 > 0:
		s = '1' * (n2 + 1)
		s += ''.join(['0' if i % 2 == 0 else '1' for i in range(n1)])
	else:
		s = '1'
		s += ''.join(['0' if i % 2 == 0 else '1' for i in range(n1)])
	print(s)


t = int(input())
for _ in range(t):
	(n0, n1, n2) = map(int, input().split())
	if n1 == 0:
		if n2 == 0:
			print('0' * (n0 + 1))
		else:
			print('1' * (n2 + 1))
	else:
		print('1' * n2, end='')
		print('10' * ((n1 + 1) // 2), end='')
		print('0' * n0, end='')
		if n1 + 1 & 1 == 1:
			print('1', end='')
		print()


def main():
	t = int(input())
	for _ in range(t):
		(n0, n1, n2) = map(int, input().split())
		if n1 == 0:
			if n0 > n2:
				s = '0' * (n0 + 1)
			else:
				s = '1' * (n2 + 1)
		else:
			s = '0' * n0
			if n1 % 2 == 0:
				s += '01' * (n1 // 2)
			else:
				s += '01' * (n1 // 2 + 1)
			s += '1' * n2
			if n1 % 2 == 0:
				s += '0'
		print(s)
main()


def restore(n1, n2, n3):
	result = ''
	if n2 != 0:
		for i in range(n3 + 1):
			result += '1'
		for i in range(n1 + 1):
			result += '0'
		for i in range((n2 - 1) // 2):
			result += '10'
		if n2 % 2 == 0:
			result += '1'
		return result
	elif n1 != 0:
		return '0' * (n1 + 1)
	else:
		return '1' * (n3 + 1)
for i in range(int(input().strip())):
	n = input().strip().split()
	print(restore(int(n[0]), int(n[1]), int(n[2])))


class SegmentTree:

	def __init__(self, data, default=0, func=lambda a, b: a + b):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from bisect import bisect_right, bisect_left
from fractions import Fraction

def pre(s):
	n = len(s)
	pi = [0] * n
	for i in range(1, n):
		j = pi[i - 1]
		while j and s[i] != s[j]:
			j = pi[j - 1]
		if s[i] == s[j]:
			j += 1
		pi[i] = j
	return pi

def prod(a):
	ans = 1
	for each in a:
		ans = ans * each
	return ans
from math import gcd

def lcm(a, b):
	return a * b // gcd(a, b)
for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	if a and b and c:
		s = '00'
		a -= 1
		if b % 2 == 0:
			s = '100'
			b -= 1
		for i in range(a):
			s += '0'
		oof = ['0', '1']
		pp = 1
		for i in range(b):
			s += oof[pp % 2]
			pp += 1
		for i in range(c):
			s += '1'
		print(s)
		continue
	if a == b == 0 and c:
		print('11' + '1' * (c - 1))
	if b == c == 0 and a:
		print('00' + '0' * (a - 1))
	if a == c == 0 and b:
		s = '10'
		pp = 1
		oof = ['0', '1']
		for i in range(b - 1):
			s += oof[pp % 2]
			pp += 1
		print(s)
	if a == 0 and b and c:
		s = '10'
		next = 1
		if b % 2:
			s = '01'
			next = 0
		oof = ['0', '1']
		for i in range(b - 1):
			s += oof[next % 2]
			next += 1
		s += '1' * c
		print(s)
	if c == 0 and a and b:
		(a, c) = (c, a)
		s = '01'
		next = 1
		if b % 2:
			s = '10'
			next = 0
		oof = ['1', '0']
		for i in range(b - 1):
			s += oof[next % 2]
			next += 1
		s += '0' * c
		print(s)


def modinv(n, p):
	return pow(n, p - 2, p)

def main():
	for case in range(int(input())):
		(n0, n1, n2) = [int(x) for x in input().split()]
		s = []
		if n1 + n2 > 0:
			s.append('1')
		while n1 > 1 and n0 > 0:
			s.append('001')
			n1 -= 2
			n0 -= 1
		while n1 > 1:
			s.append('01')
			n1 -= 2
		if n1 == 1:
			s.append('0')
		try:
			if n0 > 0:
				s[1] = '0' * (s[1].count('0') + n0) + '1' * s[1].count('1')
		except IndexError:
			s.append('0' * (n0 + 1))
		if n2 > 0:
			s[0] = '1' * (n2 + 1)
		print(''.join(s))
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.getvalue())
			(self.truncate(0), self.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			self.write = lambda s: self.buffer.write(s.encode('ascii'))
			self.read = lambda : self.buffer.read().decode('ascii')
			self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


from math import ceil
for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	n = a + b + c + 1
	if b == 0:
		if a == 0:
			print('1' * n)
		else:
			print('0' * n)
	else:
		print('1' * (c + 1) + '0' * (a + 1), end='')
		print(('10' * ceil(b / 2))[2:], end='')
		if (b + 1) % 2 == 0:
			print()
		else:
			print('1')


t = int(input())
for i in range(t):
	(n0, n1, n2) = map(int, input().split())
	if n0 == 1:
		s0 = [0, 0]
	elif n0 == 0:
		s0 = []
	else:
		s0 = [0] * (n0 + 1)
	s1 = [1, 0] * n1
	s11 = [0, 1] * n1
	if n2 == 1:
		s2 = [1, 1]
	elif n2 == 0:
		s2 = []
	else:
		s2 = [1] * (n2 + 1)
	if len(s1) == 0:
		for i in range(len(s2)):
			print(s2[i], end='')
		for j in range(len(s0)):
			print(s0[j], end='')
		print()
	elif len(s0) == 0:
		for i in range(len(s2) - 1):
			print(s2[i], end='')
		lent = int(len(s1) / 2) + 1
		for j in range(lent):
			print(s1[j], end='')
		print()
	else:
		print(1, end='')
		for i in range(len(s2) - 1):
			print(s2[i], end='')
		for j in range(len(s0) - 1):
			print(s0[j], end='')
		for k in range(int(len(s11) / 2)):
			print(s11[k], end='')
		print()


import copy
res = ''

def solve():
	global res
	(n0, n1, n2) = map(int, input().split())
	if n1 == 0:
		if n0 == 0:
			print('1' * (n0 + n1 + n2 + 1))
		elif n1 == 0:
			print('0' * (n0 + n1 + n2 + 1))
	else:
		if n1 % 2 == 1:
			res = res + '01' * (n1 // 2) + '0' + '0' * n0 + '1' * (n2 + 1)
		else:
			res = '01' * (n1 // 2) + '1' * n2 + '0' * (n0 + 1)
		print(res)
	res = ''

def test():
	for i in range(int(input())):
		solve()
test()


def main():
	t = int(input())
	for i in range(t):
		solve()

def solve():
	(n0, n1, n2) = list(map(int, input().split(' ')))
	if n1 == 0:
		if n2 == 0:
			print('0' * (n0 + 1))
		else:
			print('1' * (n2 + 1))
	else:
		final = '01'
		n1 -= 1
		if n1 != 0:
			final = final + '01' * (n1 // 2)
		final = '0' * n0 + final + '1' * n2
		if n1 % 2 == 1:
			final = final + '0'
		print(final)
main()


T = int(input())
for t in range(T):
	(n0, n1, n2) = [int(_) for _ in input().split()]
	answer = []
	if n0:
		answer += ['0'] * (n0 + 1)
	if n2:
		if answer:
			n1 -= 1
		answer += ['1'] * (n2 + 1)
	if n1 > 0 and n0 == 0 and (n2 == 0):
		n1 += 1
	while n1:
		n1 -= 1
		if not answer or answer[-1] == '1':
			answer += '0'
		else:
			answer += '1'
	print(''.join(answer))


def func(n):
	if n % 2 == 0:
		return '10' * (n // 2)
	else:
		return '10' * (n // 2) + '1'
t = int(input())
for i in range(t):
	(a, b, c) = map(int, input().split())
	if b == 0:
		if a == 0:
			print('1' * (c + 1))
		else:
			print('0' * (a + 1))
	else:
		print(func(b - 1)[::-1] + '0' * (a + 1) + '1' * (c + 1))


for T in range(int(input())):
	(c00, c01, c11) = map(int, input().split())
	res = ''
	if c00:
		res += '00'
		c00 -= 1
	res += '0' * c00
	if c11:
		res += '11'
		c11 -= 1
		if res[0] == '0':
			c01 -= 1
	res += '1' * c11
	if c01:
		if len(res) == 0:
			res += '1'
		while c01:
			if res[-1] == '1':
				res += '0'
			else:
				res += '1'
			c01 -= 1
	print(res)


for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	if not n1:
		if not n2:
			print('0' * (n0 + 1))
		else:
			print('1' * (n2 + 1))
	else:
		s0 = '0' * n0
		s1 = '1' * n2
		s10 = '10' * ((n1 + 1) // 2) + '1' * ((n1 + 1) % 2)
		print(s1 + s10[:1] + s0 + s10[1:])


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	s = []
	if b == 0:
		if a:
			s = [0] * (a + 1)
		else:
			s = [1] * (c + 1)
	else:
		for i in range(b + 1):
			if i % 2:
				s.append(0)
			else:
				s.append(1)
		s = [1] * c + s
		for (i, x) in enumerate(s):
			if not x:
				break
		s = s[:i] + [0] * a + s[i:]
	print(''.join([str(i) for i in s]))


def solve(ns):
	result = ''
	if ns[0] > 0:
		result += '0' * (ns[0] + 1)
	if ns[2] > 0:
		result += '1' * (ns[2] + 1)
	if ns[0] > 0 and ns[2] > 0:
		ns[1] -= 1
	if len(result) == 0:
		result += '0'
	elif ns[2] > 0 and ns[1] > 0:
		result += '0'
		ns[1] -= 1
	one = True
	while ns[1] > 0:
		result += '1' if one else '0'
		one = not one
		ns[1] -= 1
	return result
for i in range(int(input())):
	print(solve([int(x) for x in input().split()]))


n = int(input())
for i in range(0, n):
	o = input().rstrip().split(' ')
	a = int(o[0])
	b = int(o[1])
	c = int(o[2])
	L = []
	if c != 0:
		for k in range(0, c + 1):
			L.append(1)
		if b != 0:
			if b % 2 != 0:
				I = 0
				for j in range(0, b):
					if I % 2 == 0:
						I += 1
						L.append(0)
					else:
						L.append(1)
						I += 1
				for j in range(0, a):
					L.append(0)
			else:
				I = 0
				for j in range(0, b):
					if I % 2 == 0:
						I += 1
						L.append(0)
						if I == 1:
							for k in range(0, a):
								L.append(0)
					else:
						L.append(1)
						I += 1
	elif a != 0:
		for j in range(0, a + 1):
			L.append(0)
		I = 0
		if b != 0:
			for j in range(0, b):
				if I % 2 == 0:
					L.append(1)
					I += 1
				else:
					L.append(0)
					I += 1
	else:
		I = 0
		for j in range(0, b + 1):
			if I % 2 == 0:
				L.append(1)
				I += 1
			else:
				L.append(0)
				I += 1
	for j in range(0, len(L)):
		print(L[j], end='')
	print()


from sys import stdout, stdin
import io
import os
from collections import deque
input = stdin.readline
for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	if c != 0:
		print('1' * (c + 1), end='')
		if a != 0:
			print('0' * (a + 1), end='')
			b = b - 1
			if b % 2 == 0:
				print('10' * (b // 2), end='')
			else:
				print('10' * (b // 2) + '1', end='')
		elif b % 2 == 0:
			print('01' * (b // 2), end='')
		else:
			print('01' * (b // 2) + '0', end='')
	elif a != 0:
		print('0' * (a + 1), end='')
		if b % 2 == 0:
			print('10' * (b // 2), end='')
		else:
			print('10' * (b // 2) + '1', end='')
	elif b % 2 == 0:
		print('10' * (b // 2) + '1', end='')
	else:
		print('10' * (b // 2) + '10', end='')
	print('')


def makearr(n):
	if n % 2 == 0:
		arr = ['01', '10'] * (n // 2 - 1) + ['01']
	else:
		arr = ['01', '10'] * (n // 2) + ['01']
	return arr

def dock(a):
	s = [a[0]] + [a[i][1] for i in range(1, len(a))]
	return ''.join(s)
t = int(input())
for _ in range(t):
	(n0, n1, n2) = map(int, input().split())
	if n1 == 0:
		arr = ['00'] * n0 + ['11'] * n2
	elif n1 % 2 == 0:
		arr = ['10'] + ['00'] * n0 + makearr(n1) + ['11'] * n2
	else:
		arr = ['00'] * n0 + makearr(n1) + ['11'] * n2
	print(dock(arr))


t = int(input())
while t != 0:
	t -= 1
	(n0, n1, n2) = [int(x) for x in input().split()]
	l = {}
	x = 3
	ctr = 2
	while x < 100:
		l[x] = ctr
		ctr += 1
		x += 2
	if n1 == 0:
		if n0 == 0:
			print('11' + '1' * (n2 - 1))
		elif n2 == 0:
			print('00' + '0' * (n0 - 1))
	else:
		sol = '10'
		if n1 % 2 == 0:
			if n1 == 2:
				sol = sol
			else:
				sol = sol * l[n1 - 1]
			sol = '0' + '1' * n2 + sol + '0' * n0
		else:
			if n1 == 1:
				sol = sol
			else:
				sol = sol * l[n1]
			sol = '1' * n2 + sol + '0' * n0
		print(sol)


from collections import defaultdict

def test_case():
	(z, o, t) = map(int, input().split())
	tt = '1' * (t + 1) if t else ''
	tz = '0' * (z + 1) if z else ''
	to = '10' * ((o + 1) // 2) if o else ''
	if o and o % 2 == 0:
		to += '1'
	if z and t:
		tt = tt[:-1]
		to = to[:-1]
	elif o and t:
		tt = tt[:-1]
	elif z and o:
		to = to[:-1]
	print(tz + tt + to)
T = int(input())
for _ in range(T):
	test_case()


import sys
import math

def ii():
	return sys.stdin.readline().strip()

def idata():
	return [int(x) for x in ii().split()]

def solve_of_problem():
	(n0, n1, n2) = idata()
	ans = ''
	if n2 == 0:
		ans += '0' * (n0 + 1)
		for i in range(1, n1 + 1):
			ans += str(i % 2)
		print(ans)
	elif n0 == 0:
		ans += '1' * (n2 + 1)
		for i in range(n1):
			ans += str(i % 2)
		print(ans)
	else:
		ans += '1' * (n2 + 1) + '0' * (n0 + 1)
		n1 -= 1
		for i in range(1, n1 + 1):
			ans += str(i % 2)
		print(ans)
	return
for ______ in range(int(ii())):
	solve_of_problem()


t = int(input())
for i in range(0, t, 1):
	(n1, n2, n3) = [int(x) for x in input().split(' ')]
	s = ''
	if n1 > 0:
		for i in range(0, n1 + 1, 1):
			s = s + '0'
		if n2 % 2 == 0:
			for i in range(0, n2 - 1, 1):
				l = len(s)
				if s[l - 1] == '0':
					s = s + '1'
				else:
					s = s + '0'
		else:
			for i in range(0, n2, 1):
				l = len(s)
				if s[l - 1] == '0':
					s = s + '1'
				else:
					s = s + '0'
	if n1 == 0:
		if n2 != 0:
			s = '0'
		if n2 % 2 == 0:
			for i in range(0, n2 - 1, 1):
				l = len(s)
				if s[l - 1] == '0':
					s = s + '1'
				else:
					s = s + '0'
		else:
			for i in range(0, n2, 1):
				l = len(s)
				if s[l - 1] == '0':
					s = s + '1'
				else:
					s = s + '0'
	if n2 != 0:
		for i in range(0, n3, 1):
			s = s + '1'
	elif n2 == 0 and n3 != 0:
		for i in range(0, n3 + 1, 1):
			s = s + '1'
	if n2 % 2 == 0 and n2 > 0:
		s = s + '0'
	print(s)


import math
for nt in range(int(input())):
	(a, b, c) = map(int, input().split())
	ans = ''
	if b != 0:
		ans = '10' * ((b + 1) // 2)
		ans += '1' * (1 - b % 2)
		ans = '1' * c + ans[0] + '0' * a + ans[1:]
		print(ans)
	elif a == 0:
		print('1' * (c + 1))
	else:
		print('0' * (a + 1))


t = int(input())
for _ in range(t):
	(c, b, a) = input().split(' ')
	a = int(a)
	b = int(b)
	c = int(c)
	flag = b % 2
	if b == 0:
		flag = 1
	if not flag:
		b -= 1
	l = list()
	if a == 0 and b == 0:
		l.append(0)
	else:
		l.append(1)
	for _ in range(a):
		l.append(1)
	alt = 0
	for _ in range(b):
		l.append(alt)
		alt = (alt + 1) % 2
	for _ in range(c):
		l.append(0)
	if not flag:
		l.append(1)
	for x in l:
		print(x, end='')
	print()


from math import ceil
t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	if y == 0:
		if x == 0:
			print('1' * (z + 1))
		else:
			print('0' * (x + 1))
	else:
		st = ceil(y / 2) * '01' + (1 + y) % 2 * '0'
		st = '0' * x + st[0] + '1' * z + st[1:]
		print(st)


def RA():
	return list(map(int, input().split()))

def solve():
	(a, b, c) = RA()
	if b == 0:
		if a > 0:
			print('0' * (a + 1))
			return
		elif c > 0:
			print('1' * (c + 1))
			return
	ans = ''
	for i in range(a + 1):
		ans += '0'
	ans += '1'
	b -= 1
	for i in range(c):
		ans += '1'
	p = 0
	for i in range(b):
		ans += str(p)
		p ^= 1
	print(ans)
t = int(input())
for i in range(t):
	solve()


for f in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	if n0 == 0 and n1 == 0:
		sol = '1'
		for i in range(n2):
			sol += '1'
		print(sol)
	else:
		sol = '0'
		for i in range(n0):
			sol += '0'
		if n1 > 0:
			sol += '1'
			for i in range(n2):
				sol += '1'
		one = 0
		for i in range(n1 - 1):
			if one == 1:
				sol += '1'
			else:
				sol += '0'
			one = 1 - one
		print(sol)


test = int(input())
for i in range(test):
	answerstring = ''
	(n0, n1, n2) = list(map(int, input().split()))
	if n0 > 0:
		for i in range(n0 + 1):
			answerstring += '0'
	if n2 > 0:
		for i in range(n2 + 1):
			answerstring += '1'
	if n1 >= 1:
		if n2 > 0 and n0 == 0:
			for i in range(n1):
				if i % 2 == 0:
					answerstring += '0'
				else:
					answerstring += '1'
		if n0 > 0 and n2 == 0:
			for i in range(n1):
				if i % 2 == 0:
					answerstring += '1'
				else:
					answerstring += '0'
		if n0 == 0 and n2 == 0:
			for i in range(n1 + 1):
				if i % 2 == 0:
					answerstring += '1'
				else:
					answerstring += '0'
		if n0 >= 1 and n2 >= 1:
			for i in range(n1 - 1):
				if i % 2 == 0:
					answerstring += '0'
				else:
					answerstring += '1'
	print(answerstring)


import sys
t = int(input())
for _ in range(t):
	arr = list(map(int, input().split(' ')))
	a = arr[0]
	b = arr[1]
	c = arr[2]
	result = ''
	end = -1
	if a > 0:
		result += '0' * (a + 1)
		end = 0
	if c > 0:
		result += '1' * (c + 1)
		end = 1
	if end == -1:
		result = '1'
		end = 1
	if '01' in result:
		b -= 1
	for _ in range(b):
		if end == 1:
			result += '0'
		else:
			result += '1'
		end = 1 - end
	print(result)


for _ in range(int(input())):
	(OO, Ol, ll) = map(int, input().split())
	S = ''
	OOMiss = 0
	llMiss = 0
	if OO > 0:
		S += '0' * (OO + 1)
	else:
		OOMiss = 1
	if ll > 0:
		S += '1' * (ll + 1)
	else:
		llMiss = 1
	if OOMiss and llMiss:
		S += '10'
		Add = 1
		for i in range(Ol - 1):
			if Add:
				S += '1'
			else:
				S += '0'
			Add = 1 - Add
	elif not OOMiss and llMiss:
		Add = 1
		for i in range(Ol):
			if Add:
				S += '1'
			else:
				S += '0'
			Add = 1 - Add
	elif OOMiss and (not llMiss):
		Add = 0
		for i in range(Ol):
			if Add:
				S += '1'
			else:
				S += '0'
			Add = 1 - Add
	else:
		Add = 0
		for i in range(Ol - 1):
			if Add:
				S += '1'
				Add = 1 - Add
			else:
				S += '0'
				Add = 1 - Add
	print(S)


for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	if n1 == 0 and n2 == 0:
		print('0' * (n0 + 1))
		continue
	if n0 == 0 and n1 == 0:
		print('1' * (n2 + 1))
		continue
	if n0 == 0 and n2 == 0:
		print('01' * (n1 // 2) + '01'[:n1 % 2 + 1])
		continue
	if n0 == 0:
		print('01' * (n1 // 2 + n1 % 2) + '1' * n2 + '0' * (not n1 % 2))
		continue
	if n1 == 0:
		raise ValueError('Impossible to create')
	if n2 == 0:
		print('10' * (n1 // 2 + n1 % 2) + '0' * n0 + '1' * (not n1 % 2))
		continue
	print('0' * n0 + '01' * (n1 // 2 + n1 % 2) + '1' * n2 + '0' * (not n1 % 2))


times = int(input())
for i in range(times):
	number = input().split()
	n0 = int(number[0])
	n1 = int(number[1])
	n2 = int(number[2])
	answer = ''
	if n1 == 0:
		if n0 == 0:
			for i in range(n2 + 1):
				answer = answer + '1'
		if n2 == 0:
			for i in range(n0 + 1):
				answer = answer + '0'
		print(answer)
	else:
		answer = answer + '1'
		for i in range(n1 - 1):
			if i % 2 == 0:
				answer = answer + '0'
			elif i % 2 == 1:
				answer = answer + '1'
		if n1 % 2 == 1:
			for i in range(n2):
				answer = answer + '1'
			for j in range(n0 + 1):
				answer = answer + '0'
		if n1 % 2 == 0:
			for i in range(n0):
				answer = answer + '0'
			for j in range(n2 + 1):
				answer = answer + '1'
		print(answer)


from functools import reduce
import os
import sys
from collections import *
from math import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return tuple(map(int, input().split()))

def arr():
	return [int(i) for i in input().split()]

def sarr():
	return [int(i) for i in input()]

def starr():
	return [str(x) for x in input().split()]

def inn():
	return int(input())

def svalue():
	return tuple(map(str, input().split()))

def parr():
	return [value() for i in range(n)]
mo = 1000000007
for _ in range(inn()):
	(c0, c1, c2) = value()
	ans = [0] * (c0 + 1)
	if c1 == 0:
		if c0 > 0:
			ans = [0] * (c0 + 1)
			print(*ans, sep='')
		else:
			ans = [1] * (c2 + 1)
			print(*ans, sep='')
		continue
	if c1 == 1:
		ans = [1] * c2 + [1] + ans
	elif c1 == 2:
		ans = [1] + ans + [1] + [1] * c2
	else:
		res = (c1 - 1) // 2
		if c1 % 2 == 0:
			ans = [1] + ans + [1, 0] * res + [1] + [1] * c2
		else:
			ans = [1] * c2 + [1] + ans + [1, 0] * res
	print(*ans, sep='')


t = int(input())
while t > 0:
	(a, b, c) = map(int, input().split())
	if b == 0:
		if a == 0:
			s = '1' * (c + 1)
		else:
			s = '0' * (a + 1)
	else:
		b += 1
		s = '10' * (b // 2)
		if b % 2 != 0:
			s += '1'
		s = list(s)
		x = s.index('0')
		s[x] = '0' * (a + 1)
		y = s.index('1')
		s[y] = '1' * (c + 1)
	print(''.join(s))
	t -= 1


import sys
import math
from collections import defaultdict
t = int(sys.stdin.readline())
for _ in range(t):
	(n0, n1, n2) = map(int, sys.stdin.readline().split())
	ans = ''
	if n1 != 0:
		z = False
		if n1 % 2 != 0:
			ans = '10' * ((n1 + 1) // 2)
		else:
			ans = '10' * (n1 // 2)
			z = True
		if n0 > 0:
			if ans != '':
				if ans[-1] == '0':
					ans = ans + '0' * n0
				else:
					ans = ans + '0' * n0
			else:
				ans = '0' * (n0 + 1)
		if n2 > 0:
			if ans != '':
				ans = '1' * n2 + ans
			else:
				ans = ans + '1'
		if z:
			ans = ans + '1'
		print(ans)
		continue
	else:
		if n0 > 0:
			print('0' * (n0 + 1))
			continue
		if n2 > 0:
			print('1' * (n2 + 1))
			continue


import sys
import math as mt
input = sys.stdin.buffer.readline
t = int(input())
for __ in range(t):
	(n0, n1, n2) = map(int, input().split())
	s = ''
	if n0 != 0:
		for i in range(n0 + 1):
			s += '0'
	ch = 1
	if n0 == 0 and n1 != 0:
		s += '0'
	for i in range(n1):
		if ch % 2 != 0:
			s += '1'
		else:
			s += '0'
		ch += 1
	if n1 + n0 == 0:
		for i in range(n2 + 1):
			s += '1'
		print(s)
	else:
		ch = 0
		if n2 != 0:
			if s[-1] == '0':
				s1 = ''
				ch = 1
				for i in range(len(s) - 2):
					s1 += s[i]
				for i in range(n2 + 1):
					s1 += '1'
				s1 += '0'
			else:
				for i in range(n2):
					s += '1'
		if ch == 1:
			print(s1)
		else:
			print(s)


from sys import stdin, stdout
for test in range(int(stdin.readline())):
	arr = [int(x) for x in stdin.readline().split()]
	if arr[0] == 1:
		ans = '00'
	elif arr[0] == 0:
		ans = ''
	else:
		ans = '0' * (arr[0] + 1)
	if arr[1] >= 2:
		if arr[0] > 0:
			if arr[1] % 2 == 1:
				ans = ans + '1' + '01' * (arr[1] // 2)
			else:
				ans = '1' + ans + '1' + '01' * (arr[1] // 2 - 1)
		elif arr[1] % 2 == 1:
			ans = '01' * (arr[1] // 2 + 1)
		else:
			ans = '1' + '01' * (arr[1] // 2)
	elif arr[1] == 1:
		if arr[0] > 0:
			ans = ans + '1'
		else:
			ans = '01'
	if len(ans) > 0:
		ans = ans + '1' * arr[2]
	elif arr[2] == 1:
		ans = '11'
	else:
		ans = '1' + '1' * arr[2]
	stdout.write(ans + '\n')


t = int(input())
c = 0
while c < t:
	(n0, n1, n2) = map(int, input().split())
	s = ''
	if n2 > 0 and n0 > 0:
		for i in range(0, n2 + 1):
			s += '1'
		for i in range(0, n0 + 1):
			s += '0'
		for i in range(0, n1 - 1):
			if i % 2 == 0:
				s += '1'
			else:
				s += '0'
	elif n2 == 0 and n0 == 0:
		for i in range(0, n1 + 1):
			if i % 2 == 0:
				s += '1'
			else:
				s += '0'
	elif n2 == 0 and n0 != 0:
		for i in range(0, n0 + 1):
			s += '0'
		for i in range(0, n1):
			if i % 2 == 0:
				s += '1'
			else:
				s += '0'
	elif n2 != 0 and n0 == 0:
		for i in range(0, n2 + 1):
			s += '1'
		for i in range(0, n1):
			if i % 2 == 0:
				s += '0'
			else:
				s += '1'
	print(s)
	c = c + 1


t = int(input())
for __ in range(t):

	def gen(n0, n1, n2):
		if n1 == 0:
			if n0:
				return '0' * (n0 + 1)
			return '1' * (n2 + 1)
		else:
			array = [str(i & 1) for i in range(n1 + 1)]
			array[0] = '0' * (n0 + 1)
			array[1] = '1' * (n2 + 1)
			return ''.join(array)
	(n0, n1, n2) = map(int, input().split())
	print(gen(n0, n1, n2))


for i in range(int(input())):
	(n, n1, n2) = map(int, input().split())
	ans = ''
	if n1 >= 1:
		ans += '1' * (n2 + 1) + '0' * (n + 1)
		n1 -= 1
	elif n != 0:
		ans += '0' * (n + 1)
	elif n2 != 0:
		ans += '1' * (n2 + 1)
	for k in range(0, n1):
		if k % 2 == 0:
			ans += '1'
		else:
			ans += '0'
	print(ans)


t = int(input())
while t:
	t += -1
	(n0, n1, n2) = map(int, input().split())
	s0 = '0' * (n0 + 1)
	s2 = '1' * (n2 + 1)
	ch = 0
	if n1 % 2 == 0:
		ch = 1
		n1 -= 1
	s1 = '10' * (n1 // 2)
	if n1 >= 0:
		if ch:
			print('1' + s0 + s1 + s2)
		else:
			print(s0 + s1 + s2)
	else:
		if n0 > 0:
			print(s0, end='')
		if n2 > 0:
			print(s2, end='')
		print()


t = int(input())
for tests in range(t):
	[a, b, c] = input().split()
	a = int(a)
	b = int(b)
	c = int(c)
	if b == 0:
		if a > 0:
			for i in range(a + 1):
				print('0', end='')
		else:
			for i in range(c + 1):
				print('1', end='')
	else:
		for i in range(a + 1):
			print('0', end='')
		for i in range(c + 1):
			print('1', end='')
		b -= 1
		nx = 0
		while b > 0:
			print(int(nx), end='')
			nx += 1
			nx %= 2
			b -= 1
	print()


from collections import deque

def solve(time):
	(n0, n1, n2) = [int(x) for x in input().split()]
	base = ''
	alt = n1 + 1
	switch = 1
	if n1 != 0:
		while alt:
			if switch == 1:
				base += '1'
				switch = 0
			else:
				base += '0'
				switch = 1
			alt -= 1
	if n1 % 2 == 0 and n1 != 0:
		base1 = n0 * '0'
		base = base[:1] + base1 + base[1:]
		base += n2 * '1'
	elif n1 == 0 and n2 != 0 and (n0 == 0):
		base = (n2 + 1) * '1'
	elif n1 == 0 and n0 != 0 and (n2 == 0):
		base = (n0 + 1) * '0'
	else:
		base = n2 * '1' + base + n0 * '0'
	print(base)
nums = int(input())
for _ in range(1, nums + 1):
	solve(_)


import sys
input = sys.stdin.readline
(T,) = map(int, input().split())
for _ in range(T):
	(a, b, c) = list(map(int, input().split()))
	if b == 0 and c == 0:
		print(''.join(['0'] * (a + 1)))
		continue
	elif b == 0 and a == 0:
		print(''.join(['1'] * (c + 1)))
		continue
	ra = ['1'] * (c + 1)
	rc = ['0'] * (a + 1)
	rb = ['0', '1'] * ((b - 1) // 2)
	r = ra + rb + rc
	if b % 2 == 0:
		r.append('1')
	print(''.join(r))


from sys import stdin, stdout, setrecursionlimit
for _ in range(int(input())):
	(n1, n2, n3) = map(int, input().split())
	x = ''
	while n1 + n2 + n3 > 0:
		if n3 > 0:
			x += '1'
			n3 -= 1
			if n3 == 0:
				x += '1'
		elif n1 > 0:
			x += '0'
			n1 -= 1
			if len(x) >= 2:
				if x[-2] == '1':
					n2 -= 1
			if n1 == 0:
				x += '0'
		elif n2 > 0:
			if len(x) == 0:
				x += '0'
			else:
				if x[-1] == '1':
					x += '0'
				else:
					x += '1'
				n2 -= 1
	print(x)


from math import ceil

def solve(n0, n1, n2):
	if n1:
		pos_m = ceil((n1 + 1) / 2)
		pres = '10' * pos_m if n1 % 2 else '10' + '0' * n0 + '1' + '01' * (pos_m - 2)
		if n1 % 2:
			print('1' * n2 + pres + '0' * n0)
		else:
			print('1' * n2 + pres)
	else:
		print('1' * (n2 + 1) if n2 else '0' * (n0 + 1))
for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	solve(n0, n1, n2)


t = int(input())
for c in range(t):
	(n_0, n_1, n_2) = map(int, input().split())
	out = ''
	if n_2:
		out += '1' * (n_2 + 1)
	if n_0:
		out += '0' * (n_0 + 1)
	bit = '1' if n_0 else '0'
	for i in range(n_1 + 1 - bool(n_0 or n_2) - bool(n_0 and n_2)):
		out += bit
		bit = '1' if bit == '0' else '0'
	print(out)


def f1(start, l):
	ans = ''
	x = str(start)
	for _ in range(l):
		ans += x
		if x == '0':
			x = '1'
		else:
			x = '0'
	return ans
t = int(input())
for i1 in range(t):
	(n0, n1, n2) = list(map(int, input().split()))
	result = ''
	if n2 > 0:
		result += '1' * (n2 + 1)
	if n0 > 0:
		result += '0' * (n0 + 1)
	if n2 > 0:
		if n0 > 0:
			if n1 != 1:
				result += f1(1, n1 - 1)
		else:
			result += f1(0, n1)
	elif n0 > 0:
		result += f1(1, n1)
	else:
		result += f1(0, n1 + 1)
	print(result)


def solve():
	n = list(map(int, input().split()))
	if n[1] == 0:
		if n[0] > 0:
			print('0' * (n[0] + 1))
		if n[2] > 0:
			print('1' * (n[2] + 1))
	else:
		s = '10' * (n[1] // 2)
		s = '1' * n[2] + '10' + '0' * n[0] + s
		if n[1] % 2 == 0:
			s = s[:-1]
		print(s)

def main():
	t = int(input())
	for _ in range(t):
		solve()
main()


from sys import stdin
input = stdin.buffer.readline
s = '10' * 50
for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	if not b:
		print('0' * (a + 1) if a else '1' * (c + 1))
	else:
		print((s[:b - 1][::-1] if b else '') + '0' * (a + 1) + '1' * (c + 1))


from sys import stdin
from math import gcd
inp = lambda : stdin.readline().strip()
t = int(inp())
for _ in range(t):
	(n0, n1, n2) = [int(x) for x in inp().split()]
	n1 += 1
	start = '1'
	other = '0'
	if n2 != 0:
		print('1' * (n2 + 1), end='')
		n1 -= 1
		start = '0'
		other = '1'
	if n0 != 0:
		print('0' * (n0 + 1), end='')
		n1 -= 1
		start = '1'
		other = '0'
	for i in range(n1):
		if i % 2 == 0:
			print(start, end='')
		else:
			print(other, end='')
	print()


def solve():
	(n, m, k) = map(int, input().split())
	if m % 2 == 1:
		s1 = '10' * ((m + 1) // 2)
		s2 = '1' * k
		s3 = '0' * n
		print(s2 + s1 + s3)
	else:
		if m == 0:
			if n > 0:
				print('0' * (n + 1))
			else:
				print('1' * (k + 1))
			return
		s1 = '10' * (m // 2)
		s2 = '1' * k
		s3 = '0' * n
		print(s2 + s1 + s3 + '1')

def main():
	n = int(input())
	for i in range(n):
		solve()
main()


def pairwise(iterable):
	(a, b) = tee(iterable)
	next(b, None)
	return zip(a, b)
for _ in range(int(input())):
	(n0, n1, n2) = list(map(int, input().split(' ')))
	if n2 > 0:
		res = '1' * (n2 + 1)
	elif n1 > 1:
		res = '1'
	else:
		res = ''
	if n1 > 0:
		for _ in range(n1 - 1):
			if res == '':
				res += '1'
			elif res[-1] == '0':
				res += '1'
			else:
				res += '0'
		if res == '':
			res = '10'
		elif res[-1] == '0':
			res = '0' + res
		else:
			res += '0'
	if res == '':
		if n0 > 0:
			res += '0' * (n0 + 1)
	else:
		res += '0' * n0
	print(res)


def main():
	for _ in range(int(input())):
		(a, b, c) = map(int, input().split())
		if b:
			l = (['0', '1'] * (b // 2 + 1))[:b + 1]
			l[0] = '0' * (a + 1)
			l[1] = '1' * (c + 1)
			print(''.join(l))
		else:
			print('0' * (a + 1) if a else '1' * (c + 1))
main()


from math import ceil
for t in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	s1 = ''
	if n0:
		s1 += '0' * n0
		if n1 == 0:
			s1 += '0'
	s2 = ''
	if n1 > 0:
		if n2 > 0:
			n1 -= 1
		s2 += '01' * ceil(n1 / 2)
		if n1 % 2 == 0:
			s2 += '0'
	s = s1 + s2
	s3 = ''
	if n2 > 0:
		s3 = '1' * (n2 + 1)
	s = s3 + s
	print(s)


tcs = int(input())
for tc in range(tcs):
	(a, b, c) = map(int, input().split())
	if b == 0:
		if a != 0:
			print((a + 1) * '0')
		else:
			print((c + 1) * '1')
	else:
		ans = ''
		for i in range(b + 1):
			if i % 2 == 1:
				ans += '0'
			else:
				ans += '1'
		ans = ans[:1] + '0' * a + ans[1:]
		ans = '1' * c + ans
		print(ans)


import os, io
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
cases = int(input())
for t in range(cases):
	s = ''
	(n0, n1, n2) = list(map(int, input().split()))
	if n1:
		v = n1 // 2
		v1 = n1 % 2
		if v1:
			s = '01' * (v + 1)
		else:
			s = '01' * v + '0'
		if n0:
			s = '0' * n0 + s
		if n2:
			p = s.find('1')
			s = s[:p] + '1' * n2 + s[p:]
	else:
		if n0:
			s = '0' * (n0 + 1)
		if n2:
			s = '1' * (n2 + 1)
	print(s)


def solve():
	(n0, n1, n2) = [int(x) for x in input().split()]
	res = []
	if n1:
		(a, b, c) = ([], [], [])
		if n0:
			a.append('0')
			for _ in range(n0):
				a.append('0')
		x = 1
		for _ in range(n1 + (n0 == 0)):
			b.append(str(x))
			x ^= 1
		if b and b[-1] == '0':
			(b, c) = ([], b)
			for _ in range(n2):
				b.append('1')
		else:
			for _ in range(n2):
				c.append('1')
		res = a + b + c
	elif n0:
		res = ['0' for _ in range(n0 + 1)]
	else:
		res = ['1' for _ in range(n2 + 1)]
	print(''.join(res))
for _ in range(int(input())):
	solve()


import sys
readline = sys.stdin.readline
readlines = sys.stdin.readlines
ns = lambda : readline().rstrip()
ni = lambda : int(readline().rstrip())
nm = lambda : map(int, readline().split())
nl = lambda : list(map(int, readline().split()))
prn = lambda x: print(*x, sep='\n')

def solve():
	n = nl()
	f = 0
	if n[0] == n[1] == 0:
		l = [1] * (n[2] + 1)
		print(*l, sep='')
		return
	if n[1] == n[2] == 0:
		l = [0] * (n[0] + 1)
		print(*l, sep='')
		return
	l = [0] * (n[0] + 1)
	for i in range(n[1]):
		l.append((i + 1) % 2)
	if l[-1] == 0:
		l.pop()
		f = 1
	l += [1] * n[2]
	if f:
		l.append(0)
	print(*l, sep='')
	return
T = ni()
for _ in range(T):
	solve()


import sys
import math
from collections import defaultdict

def solve(test):
	(zero, one, two) = map(int, input().split())
	if not one and (not two):
		print('0' * (zero + 1))
		return
	res2 = '1' * (two + 1)
	res1 = ('01' * one)[:one]
	res0 = '0' * zero
	res = res2 + res1
	res = res[:-1] + res0 + res[-1]
	print(res)
test_cases = int(input())
for t in range(1, test_cases + 1):
	solve(t)


from sys import stdin
t = int(stdin.readline())
for _ in range(t):
	(n0, n1, n2) = list(map(int, stdin.readline().split()))
	if n0 + n1 + n2 == n0:
		print((n0 + 1) * '0')
	elif n0 + n1 + n2 == n2:
		print((n2 + 1) * '1')
	elif n1 % 2 != 0:
		print(n2 * '1' + (n1 + 1) // 2 * '10' + n0 * '0')
	else:
		print(n2 * '1' + n1 // 2 * '10' + n0 * '0' + '1')


def solve(n0, n1, n2):
	if n1 % 2 == 1:
		print(n0 * '0' + (n1 + 1) // 2 * '01' + n2 * '1')
	elif n1 == 0:
		if n0 == 0:
			print('1' * (n2 + 1))
		if n2 == 0:
			print('0' * (n0 + 1))
	elif n0 + n2 == 0:
		print('01' * (n1 // 2) + '0')
	elif n0 == 0:
		print('10' * (n1 // 2) + '1' + n2 * '1')
	elif n2 == 0:
		print('01' * (n1 // 2) + '0' + n0 * '0')
	else:
		print(n0 * '0' + '01' * (n1 // 2) + n2 * '1' + '0')
T = int(input())
for ti in range(1, T + 1):
	(n0, n1, n2) = list(map(int, input().split(' ')))
	solve(n0, n1, n2)


import math as mt
import sys, string
input = sys.stdin.readline
import random
from collections import deque, defaultdict
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
I = lambda : int(input())
t = I()
d = defaultdict(int)
for i in range(t):
	l = L()
	s = ''
	if l[0]:
		for i in range(l[0] + 1):
			s += '0'
	if l[2]:
		for j in range(l[2] + 1):
			s += '1'
	if l[2] * l[0] > 0:
		l[1] -= 1
	if l[2] + l[0] == 0:
		l[1] += 1
	for i in range(l[1]):
		s += str((i + int(l[2] == 0)) % 2)
	print(s)


for _ in range(int(input())):
	(a0, a1, a2) = [int(i) for i in input().split()]
	bs = ''
	if a0 != 0:
		bs += '0' * (a0 + 1)
	if a2 != 0:
		bs += '1' * (a2 + 1)
	if a0 > 0 and a2 > 0:
		a1 -= 1
	if len(bs) == 0:
		bs += '0'
	for i in range(a1):
		bs += str((int(bs[-1]) + 1) % 2)
	print(bs)


T = int(input())
for t in range(T):
	(n0, n1, n2) = list(map(int, input().split()))
	if n1 == 0 and n2 == 0:
		s = '0' * (n0 + 1)
	elif n0 == 0 and n2 == 0:
		ss = '01' * n1
		s = ss[:n1 + 1]
	elif n1 == 0 and n0 == 0:
		s = '1' * (n2 + 1)
	else:
		s = ''
		if n0 > 0:
			s0 = '0' * (n0 + 1)
			s += s0
		if n2 > 0:
			s2 = '1' * (n2 + 1)
			s += s2
		if n1 > 1:
			ss1 = '01' * n1
			if n2 == 0:
				ss1 = '10' * n1
			s1 = ss1[:n1 - 1]
			s += s1
		if n0 == 0 or n2 == 0:
			s += str(1 - int(s[-1]))
	print(s)


from sys import stdin, stdout
input = lambda : stdin.readline().strip()
fast_print = stdout.write
T = int(input())
for _ in range(T):
	(a, b, c) = map(int, input().split())
	if a > 0 and b > 0 and (c > 0):
		cur = 0
		for i in range(max(b - 1, 0)):
			fast_print(str(cur))
			cur = 1 - cur
		if cur == 0:
			for i in range(a + 1):
				fast_print('0')
			for i in range(c + 1):
				fast_print('1')
		else:
			for i in range(c + 1):
				fast_print('1')
			for i in range(a + 1):
				fast_print('0')
	else:
		if a != 0:
			for i in range(a + 1):
				fast_print('0')
		else:
			for i in range(c + 1):
				fast_print('1')
		if b != 0:
			cur = 1 if a != 0 else 0
			for i in range(b):
				fast_print(str(cur))
				cur = 1 - cur
	fast_print('\n')


from sys import stdin, stdout
from math import gcd, ceil, sqrt
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()
mod = 1000000007
tc = ii1()
for _ in range(tc):
	(n0, n1, n2) = iia()
	res = ''
	one = two = False
	if n2 > 0:
		res += '1' * (n2 + 1)
		one = True
	if n0 > 0:
		res += '0' * (n0 + 1)
		two = True
	if one and two and (n1 - 1 > 0) or n1 > 0:
		if one and two:
			n1 -= 1
			if n1 > 0:
				res += '1'
				n1 -= 1
		elif not one and two:
			res += '1'
			n1 -= 1
		elif not one and (not two):
			res += '1'
		flip = True
		while n1 > 0:
			if flip:
				res += '0'
				flip = False
			else:
				res += '1'
				flip = True
			n1 -= 1
	print(res)


import math
test_cases = int(input())
for _ in range(test_cases):
	(n0, n1, n2) = map(int, input().split())
	binary_string = list()
	if n1:
		binary_string = ['0', '1'] * math.ceil(n1 / 2)
		if n1 % 2 == 0:
			binary_string += ['0']
	if n0:
		if binary_string and binary_string[0] == '0':
			binary_string = ['0'] * n0 + binary_string
		else:
			binary_string = ['0'] * (n0 + 1) + binary_string
	if n2:
		if binary_string and binary_string[-1] == '1':
			binary_string = binary_string + ['1'] * n2
		elif binary_string and binary_string[-1] != '1':
			binary_string = binary_string[:-1] + ['1'] * n2 + ['0']
		else:
			binary_string = binary_string + ['1'] * (n2 + 1)
	print(''.join(binary_string))


t = int(input())
while t > 0:
	t -= 1
	(n0, n1, n2) = map(int, input().split())
	if n1 == 0:
		if n0 > 0:
			for i in range(n0 + 1):
				print(0, end='')
		else:
			for i in range(n2 + 1):
				print(1, end='')
		print()
		continue
	x = True
	for i in range(n1 - 1):
		if x:
			print(0, end='')
			x = False
		else:
			print(1, end='')
			x = True
	if x:
		for i in range(n0 + 1):
			print(0, end='')
		for i in range(n2 + 1):
			print(1, end='')
	else:
		for i in range(n2 + 1):
			print(1, end='')
		for i in range(n0 + 1):
			print(0, end='')
	print()


import sys
input = sys.stdin.readline
from collections import *
t = int(input())
for _ in range(t):
	(n0, n1, n2) = map(int, input().split())
	if n1 == 0:
		if n0 == 0:
			print('1' * (n2 + 1))
		else:
			print('0' * (n0 + 1))
		continue
	ans = []
	for _ in range(n2 + 1):
		ans.append('1')
	for _ in range(n0 + 1):
		ans.append('0')
	n1 -= 1
	while True:
		if n1 == 0:
			break
		if ans[-1] == '0':
			ans.append('1')
		else:
			ans.append('0')
		n1 -= 1
	print(''.join(ans))


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__

def gift():
	for _ in range(t):
		(n0, n1, n2) = list(map(int, input().split()))
		ans = ''
		if n0 > 0:
			ans = '0' + '0' * n0
		if n1 > 0:
			if ans == '':
				ans += '0'
			if n1 % 2 == 0:
				ans = '1' + ans
				ans += '1'
				ans += '01' * (n1 // 2 - 1)
			else:
				ans += '1'
				ans += '01' * ((n1 + 1) // 2 - 1)
		if ans == '':
			ans += '1'
		ans += '1' * n2
		yield ans
t = int(input())
ans = gift()
print(*ans, sep='\n')


n = int(input())
for i in range(n):
	x = input()
	n = x.split()
	n1 = int(n[0])
	n2 = int(n[1])
	n3 = int(n[2])
	s = ''
	for j in range(n2 + 1):
		s += str(j % 2)
	if n2 % 2 == 1:
		s = '0' * n1 + s + '1' * n3
	elif n2 != 0:
		s = s[0] + '1' * n3 + s[1:] + '0' * n1
	elif n1:
		s = '0' * (n1 + 1)
	elif n3:
		s = '1' * (n3 + 1)
	print(s)


t = int(input())
for i in range(t):
	n = list(map(int, input().split()))
	ans = ''
	if n[1] == 0:
		if n[0] == 0:
			print('1' * (n[2] + 1))
		else:
			print('0' * (n[0] + 1))
		continue
	cnt = 0
	for i in range(n[1] + 1):
		if cnt % 2 == 0:
			ans += '1'
		else:
			ans += '0'
		cnt += 1
	ans = '1' * n[2] + ans[0] + '0' * n[0] + ans[1:]
	print(ans)


import os
import sys
from io import BytesIO, IOBase

def main():
	for _ in range(int(input())):
		(n0, n1, n2) = [int(x) for x in input().split()]
		a = []
		if n0:
			a += [0] * (n0 + 1)
		if n2:
			if a:
				n1 -= 1
			a += [1] * (n2 + 1)
		c = 0
		if a:
			c = a[-1] ^ 1
		else:
			a = [1]
		while n1 > 0:
			a.append(c)
			n1 -= 1
			c ^= 1
		print(''.join((str(x) for x in a)))
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


for t in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	answer = []
	if n0 > 0:
		answer += [0, 0]
		answer += [0] * (n0 - 1)
	if n2 > 0:
		if answer == []:
			answer += [1, 1]
		elif answer[-1] == 0:
			answer += [1, 1]
			n1 -= 1
		else:
			answer += [1]
		answer += [1] * (n2 - 1)
	if n1 > 0:
		if answer == []:
			answer += [0, 1]
		elif answer[-1] == 0:
			answer += [1]
		else:
			answer += [0]
		n1 -= 1
		for j in range(n1):
			if answer[-1] == 0:
				answer.append(1)
			else:
				answer.append(0)
	print(''.join(list(map(str, answer))))


for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	res = ''
	if n1 > 0:
		for i in range(n1 + 1):
			if i % 2 == 0:
				res += '0' * (n0 + 1)
				n0 = 0
			elif i % 2 == 1:
				res += '1' * (n2 + 1)
				n2 = 0
	elif n0 > 0:
		res = '0' * (n0 + 1)
	else:
		res = '1' * (n2 + 1)
	print(res)


for _ in range(int(input())):
	(s0, s1, s2) = map(int, input().split())
	s2_set = ''
	s1_set = ''
	s0_set = ''
	if s2 > 0:
		s2_set = '1' * (s2 + 1)
	if s0 > 0:
		s0_set = '0' * (s0 + 1)
	if s1 > 0:
		if s2_set == '':
			s1 += 1
		if s0_set == '':
			s1_set = '0'
		for i in range(2, s1 + 1):
			if i % 2 == 0:
				s1_set = s1_set + '1'
			if i % 2 != 0:
				s1_set = s1_set + '0'
	print(s2_set + s0_set + s1_set)


cases = int(input())
for t in range(cases):
	s = ''
	(n0, n1, n2) = list(map(int, input().split()))
	if n1:
		v = n1 // 2
		v1 = n1 % 2
		if v1:
			s = '01' * (v + 1)
		else:
			s = '01' * v + '0'
		if n0:
			s = '0' * n0 + s
		if n2:
			p = s.find('1')
			s = s[:p] + '1' * n2 + s[p:]
	else:
		if n0:
			s = '0' * (n0 + 1)
		if n2:
			s = '1' * (n2 + 1)
	print(s)


I = lambda : list(map(int, input().split()))
for tc in range(int(input())):
	(a, b, c) = I()
	ans = ''
	if not b:
		if c:
			print('1' * (c + 1))
		else:
			print('0' * (a + 1))
	else:
		ans = '0' * (a + 1) + '1' * (c + 1)
		(aa, bb) = divmod(b - 1, 2)
		ans += '01' * aa
		if bb:
			ans += '0'
		print(ans)


t = int(input())
elem = []
res = []
for i in range(t):
	elem.append(list(map(int, input().split())))
for (n0, n1, n2) in elem:
	s = ''
	if n1 > 1:
		s = '1' * (n2 + 1) + '0' + '0' * n0 + '1'
		fl = True
		for i in range(n1 - 2):
			if fl:
				s += '0'
				fl = False
			else:
				s += '1'
				fl = True
	elif n1 == 1:
		s = '0' * (n0 + 1) + '1' * (n2 + 1)
	elif n0 != 0:
		s = '0' * (n0 + 1)
	else:
		s = '1' * (n2 + 1)
	print(s)


for _ in range(int(input())):
	(zero, ones, two) = map(int, input().split())
	o = ['0', '1']
	res = ''
	h = 0
	if two != 0:
		res += '1' * (two + 1)
		h += 1
	if zero != 0:
		res += '0' * (zero + 1)
		o.reverse()
		h += 1
	if ones != 0:
		if h == 2:
			ones -= 1
		elif h == 0:
			res += ''.join(o)
			ones -= 1
		if ones % 2 != 0:
			o.reverse()
		while ones > 0:
			res += str(o[ones % 2])
			ones -= 1
	print(res)


import sys
import math
import operator as op
from functools import reduce

def read_line():
	return sys.stdin.readline()[:-1]

def read_int():
	return int(sys.stdin.readline())

def read_int_line():
	return [int(v) for v in sys.stdin.readline().split()]

def read_float_line():
	return [float(v) for v in sys.stdin.readline().split()]

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer / denom
t = read_int()
for i in range(t):
	(n0, n1, n2) = read_int_line()
	s = ''
	if n0 > 0:
		s += '0' * (n0 + 1)
	if n2 > 0:
		s += '1' * (n2 + 1)
	t = ''
	c = 0
	if n0 > 0 and n2 > 0:
		n1 -= 1
	elif n0 == 0 and n2 == 0:
		s += '1'
	elif n2 == 0:
		c = 1
	while n1 > 0:
		if c == 1:
			t += '1'
			c = 0
		else:
			t += '0'
			c = 1
		n1 -= 1
	s += t
	print(s)


def main():
	T = int(input())
	for _ in range(T):
		(N0, N1, N2) = list(map(int, input().split()))
		s = ''
		if N1 == 0:
			if N0 > 0:
				for i in range(N0 + 1):
					s += '0'
			else:
				for i in range(N2 + 1):
					s += '1'
		elif N1 & 1:
			if N0 > 0:
				for i in range(N0):
					s += '0'
			for i in range(N1 + 1):
				if i & 1:
					s += '1'
				else:
					s += '0'
			if N2 > 0:
				for i in range(N2):
					s += '1'
		else:
			s = '1'
			if N0 > 0:
				for i in range(N0):
					s += '0'
			for i in range(N1):
				if i & 1:
					s += '1'
				else:
					s += '0'
			if N2 > 0:
				for i in range(N2):
					s += '1'
		print(s)
main()


def soln(n0, n1, n2):
	result = []
	for _ in range(n1):
		if len(result) == 0:
			result.append('0')
		prev = result[-1]
		if prev == '0':
			result.append('1')
		else:
			result.append('0')
	try:
		zeroIndex = result.index('0')
		for _ in range(n0):
			result.insert(zeroIndex, '0')
	except:
		for _ in range(n0):
			if len(result) == 0:
				result.append('0')
			result.append('0')
	try:
		oneIndex = result.index('1')
		for _ in range(n2):
			result.insert(oneIndex, '1')
	except:
		for _ in range(n2):
			if len(result) == 0:
				result.append('1')
			result.append('1')
	return ''.join(result)

def main():
	t = int(input())
	for _ in range(t):
		(n0, n1, n2) = [int(x) for x in input().split()]
		result = soln(n0, n1, n2)
		print(result)
main()


for case in range(int(input())):
	s0 = ''
	s1 = ''
	s2 = ''
	(n0, n1, n2) = [int(x) for x in input().split()]
	if n1 > 0:
		s1 = '10'
		while len(s1) != n1 + 1:
			s1 += '1'
			if len(s1) != n1 + 1:
				s1 += '0'
	if n1 > 0:
		ans = '1' * n2 + s1[0] + '0' * n0 + s1[1:]
	if n1 == 0:
		if n0 == 0:
			ans = '1' * (n2 + 1)
		elif n2 == 0:
			ans = '0' * (n0 + 1)
	print(ans)


import math
t = int(input())
for _ in range(t):
	(p, q, r) = [int(x) for x in input().split()]
	f = ''
	if q == 0:
		if p != 0:
			for i in range(p + 1):
				f += '0'
		else:
			for i in range(r + 1):
				f += '1'
		print(f)
	else:
		for i in range(q + 1):
			if i & 1:
				f += '0'
			else:
				f += '1'
		a = ''
		for i in range(p):
			a += '0'
		w = ''
		for i in range(r):
			w += '1'
		s = f.index('1')
		f = f[:s] + w + f[s:]
		x = f.index('0')
		f = f[:x] + a + f[x:]
		print(f)


for t in range(int(input())):
	(n0, n1, n2) = list(map(int, input().split()))
	l = []
	flag0 = -1
	flag1 = -1
	if n0 >= 1:
		l.append(0)
		l.append(0)
		n0 -= 1
		while n0 > 0:
			l.append(0)
			n0 -= 1
	if n1 >= 1:
		if len(l) == 0:
			l.append(0)
			l.append(1)
			n1 -= 1
		else:
			l.append(1)
			n1 -= 1
		if n1 % 2 == 0:
			flag0 = 0
			while n1 > 0:
				l.append(0)
				l.append(1)
				n1 -= 2
		else:
			flag0 = 1
			n1 -= 1
			while n1 > 0:
				l.append(0)
				l.append(1)
				n1 -= 2
	if flag0 == 1:
		l.insert(0, 1)
	if n2 >= 1:
		if len(l) == 0:
			l.append(1)
			l.append(1)
			n2 -= 1
		else:
			l.append(1)
			n2 -= 1
		if n2 % 2 == 0:
			flag1 = 0
			while n2 > 0:
				l.append(1)
				l.append(1)
				n2 -= 2
		else:
			flag1 = 1
			n2 -= 1
			while n2 > 0:
				l.append(1)
				l.append(1)
				n2 -= 2
	if flag1 == 1:
		l.append(1)
	print(*l, sep='')


test = int(input())
for tes in range(test):
	(a, b, c) = list(map(int, input().split()))
	s = ''
	if a != 0 and c != 0:
		s = '1' * (c + 1) + '0' * (a + 1)
		b -= 1
	elif c != 0:
		s = '1' * (c + 1)
	elif a != 0:
		s = '0' * (a + 1)
	else:
		s = '1'
		while b != 0:
			if s[-1] == '1':
				s = s + '0'
			else:
				s = s + '1'
			b -= 1
	last = ''
	while b > 0:
		if s[-1] == '1':
			s = s + '0'
		else:
			s = s + '1'
		b -= 1
	print(s)


for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split(' '))
	if n0 > 0 and n2 > 0:
		n1 -= 1
	if n0 != 0:
		print(0, end='')
	for i in range(n0):
		print(0, end='')
	if n2 != 0:
		print(1, end='')
	for i in range(n2):
		print(1, end='')
	start = 1
	if n2 != 0:
		start = 0
	if n0 == 0 and n2 == 0:
		print(0, end='')
	for i in range(n1):
		print(start, end='')
		start = (start + 1) % 2
	print()


t = int(input())
for _ in range(t):
	(n1, n2, n3) = map(int, input().split())
	a = []
	prev = 0
	if n2 % 2 != 0 or n2 == 0:
		for i in [[n1, 0], [n2, 1], [n3, 2]]:
			while i[0]:
				if a:
					if i[1] == 0:
						a += [0]
					elif i[1] == 2:
						a += [1]
					elif prev:
						a += [0]
						prev = 0
					else:
						a += [1]
						prev = 1
				else:
					a += [(2 - i[1]) * '0' + i[1] * '1']
					if i[1] == 1:
						prev = 1
				i[0] -= 1
	else:
		a += ['10']
		n2 -= 1
		for i in [[n1, 0], [n2, 1], [n3, 2]]:
			while i[0]:
				if a:
					if i[1] == 0:
						a += [0]
					elif i[1] == 2:
						a += [1]
					elif prev:
						a += [0]
						prev = 0
					else:
						a += [1]
						prev = 1
				i[0] -= 1
	print(''.join([str(i) for i in a]))


b77 = 'abcdefghijklmnopqrstuvwxyz'
arr = []
d = []
count = 0
t = int(input())
for i in range(t):
	(n0, n1, n2) = map(int, input().split())
	if n0 * n1 * n2 != 0:
		n1 -= 1
		print('11' + '1' * (n2 - 1) + '00' + '0' * (n0 - 1), end='')
		if n1 != 0:
			if n1 == 1:
				print('1', end='')
			elif n1 % 2 == 0:
				print('10' * (n1 // 2), end='')
			else:
				print('10' * (n1 // 2) + '1', end='')
		print()
		continue
	if n2 != 0:
		print('11' + '1' * (n2 - 1), end='')
		if n1 != 0:
			if n1 == 1:
				print('0', end='')
			elif n1 % 2 == 0:
				print('01' * (n1 // 2), end='')
			else:
				print('01' * (n1 // 2) + '0', end='')
	elif n0 == 0:
		if n1 % 2 == 1:
			print('10' * (n1 // 2 + 1), end='')
		else:
			print('10' * (n1 // 2) + '1', end='')
	elif n1 == 0:
		print('00' + '0' * (n0 - 1), end='')
	else:
		print('00' + '0' * (n0 - 1), end='')
		if n1 > 0:
			if n1 == 1:
				print('1', end='')
			elif n1 % 2 == 0:
				print('10' * (n1 // 2), end='')
			else:
				print('10' * (n1 // 2) + '1', end='')
	print()


t = int(input())
for T in range(t):
	(n0, n1, n2) = map(int, input().split())
	ans = ''
	if n1 == 0:
		if n0 > 0:
			ans = '0' * (n0 + 1)
		else:
			ans = '1' * (n2 + 1)
	else:
		ans = '0' * (n0 + 1) + '1' * (n2 + 1)
		flag = 0
		for i in range(n1 - 1):
			ans += str(flag)
			flag ^= 1
	print(ans)


def printer(s, n):
	for i in range(0, n):
		print(s, end='')
t = int(input())
for i in range(0, t):
	(n0, n1, n2) = list(map(int, input().split()))
	if n2 == 0:
		if n1 % 2 == 0:
			print('0', end='')
			n = int(n1 / 2)
		else:
			n = int((n1 + 1) / 2)
		s = '10'
		printer(s, n)
		s = '0'
		printer(s, n0)
	elif n0 == 0:
		if n1 % 2 == 1:
			n = int((n1 + 1) / 2)
		else:
			n = int(n1 / 2)
			print('1', end='')
		s = '01'
		printer(s, n)
		s = '1'
		printer(s, n2)
	else:
		s = '0'
		printer(s, n0)
		if n1 % 2 == 0:
			s = '01'
			printer(s, int(n1 / 2))
			s = '1'
			printer(s, n2)
			print('0', end='')
		else:
			s = '01'
			printer(s, int((n1 + 1) / 2))
			s = '1'
			printer(s, n2)
	print()


t = int(input())
while t:
	t -= 1
	(x, y, z) = map(int, input().strip().split(' '))
	s = '1' * (z + 1)
	if x == 0 and y == 0:
		print('1' * (z + 1))
	elif y == 0 and z == 0:
		print('0' * (x + 1))
	else:
		y -= 1
		s += '0' * (x + 1)
		if y % 2 == 0:
			s += '10' * (y // 2)
		else:
			y -= 1
			s = '0' + s + '10' * (y // 2)
		print(s)


for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	if n1 == 0:
		if n0 != 0:
			s = '0' * (n0 + 1)
		elif n2 != 0:
			s = '1' * (n2 + 1)
	else:
		s = '1' * n2
		s += '1'
		s += '0' * n0
		s += '0'
		z = '10' * n1
		s += z[:n1 - 1]
	print(s)


t = input()
for _ in range(int(t)):
	(a, b, c) = map(int, input().split())
	ans = '0' * a
	flag = -1
	if b > 0:
		ans = ans + '0'
		if b % 2 == 1:
			ans = ans + '10' * (b // 2) + '1'
			flag = 0
		else:
			ans = ans + '10' * (b // 2 - 1) + '1'
			flag = 1
	ans = ans + '1' * c
	if flag == 1:
		ans = ans + '0'
	if a != 0 and a + b + c == a or (c != 0 and a + b + c == c):
		if a != 0:
			ans += '0'
		else:
			ans += '1'
	print(ans)


t = int(input())
for i in range(0, t):
	(n0, n1, n2) = map(int, input().split())
	for i in range(0, n0):
		print('0', end='')
	if n1 > 0:
		print('01', end='')
		n1 -= 1
	elif n0 > 0:
		print('0', end='')
	else:
		print('1', end='')
	for i in range(0, n2):
		print('1', end='')
	last = 1
	for i in range(0, n1):
		last = 1 - last
		print(last, end='')
	print()


for tc in range(int(input())):
	(n0, n1, n2) = [int(s) for s in input().split()]
	print('0' * (n0 + 1) + '1' * (n2 + 1) + ''.join([str(i & 1) for i in range(n1 - 1)]) if n1 > 0 else '0' * (n0 and n0 + 1) + '1' * (n2 and n2 + 1))


t = int(input())
for i in range(t):
	(n0, n1, n2) = list(map(int, input().split()))
	if n1 == 0:
		if n0:
			print('0' * (n0 + 1))
		else:
			print('1' * (n2 + 1))
		continue
	s = ''
	s += '0' * (n0 + 1)
	s += '1' * (n2 + 1)
	d = 0
	n = n1 - 1
	while n > 0:
		s += str(d)
		d = (d + 1) % 2
		n -= 1
	print(s)


for t in range(int(input())):
	ns = list(map(int, input().split(' ')))
	if ns[1] == 0:
		if ns[0] > 0:
			print('0' * (ns[0] + 1))
		else:
			print('1' * (ns[2] + 1))
	else:
		ans = '0' * (ns[0] + 1) + '10' * ((ns[1] - 1) // 2) + '1' * (ns[2] + 1) + '0' * int(ns[1] % 2 == 0)
		print(ans)


T = int(input())
while T > 0:
	(n0, n1, n2) = map(int, input().split())
	res = ''
	if n2 > 0:
		res += '1' * (n2 + 1)
	should = '0'
	if n0 > 0:
		res += '0' * (n0 + 1)
		should = '1'
	x = n0 + n1 + n2 + 1 - len(res)
	for i in range(x):
		res += should
		if should == '1':
			should = '0'
		else:
			should = '1'
	print(res)
	T -= 1


for i in range(int(input())):
	(n0, n1, n2) = map(int, input().split(' '))
	s = ''
	if n0:
		s += '0'
		for i in range(n0):
			s += '0'
	if n2:
		s += '1'
		for i in range(n2):
			s += '1'
	if n0 and n2:
		n1 -= 1
	if not len(s):
		s += '0'
		for i in range(n1):
			s += '0' if i % 2 else '1'
	else:
		prev = int(s[len(s) - 1])
		for i in range(n1):
			s += str(1 - prev)
			prev = 1 - prev
	print(s)


def solve(n0, n1, n2):
	if n1 == 0:
		if n0 != 0:
			ans = [0] * (n0 + 1)
		else:
			ans = [1] * (n2 + 1)
	else:
		ans = [0] * (n0 + 1) + [1] * (n2 + 1)
		n1 -= 1
		(i, a) = (0, [])
		while i < n1:
			if i % 2 == 0:
				a = [1] + a
			else:
				a = [0] + a
			i += 1
		ans = a + ans
	for m in ans:
		print(m, end='')
	print()
t = 1
t = int(input())
while t > 0:
	(n0, n1, n2) = [int(x) for x in input().split()]
	solve(n0, n1, n2)
	t -= 1


import sys
input = lambda : sys.stdin.readline().rstrip()
inp = sys.stdin.buffer.readline
from math import ceil

def I():
	return list(map(int, inp().split()))
from collections import deque, defaultdict as dd
from bisect import bisect_left as bl
for _ in range(I()[0]):
	(n0, n1, n2) = I()
	if n1 == 0:
		if n0 > 0:
			print('0' * (n0 + 1))
		else:
			print('1' * (n2 + 1))
	else:
		s0 = '0' * (n0 + 1)
		s2 = '1' * (n2 + 1)
		s1 = []
		n1 -= 1
		for i in range(n1):
			s1.append(str(i % 2))
		print(s0 + s2 + ''.join(s1))


def main():
	T = int(input())
	for _ in range(T):
		(N0, N1, N2) = map(int, input().split())
		if N1 == 0:
			if N0 != 0:
				print('0' * (N0 + 1))
			else:
				print('1' * (N2 + 1))
		else:
			ans = ''
			if N2 != 0:
				ans = '1' * (N2 + 1)
			if N0 != 0:
				ans += '0' * (N0 + 1)
			if N2 != 0:
				if N0 != 0:
					for count in range(2, N1 + 1):
						if count % 2 == 0:
							ans += '1'
						else:
							ans += '0'
				else:
					for count in range(1, N1 + 1):
						if count % 2 != 0:
							ans += '0'
						else:
							ans += '1'
			elif N0 != 0:
				for count in range(1, N1 + 1):
					if count % 2 != 0:
						ans += '1'
					else:
						ans += '0'
			else:
				for count in range(1, N1 + 2):
					if count % 2 != 0:
						ans += '1'
					else:
						ans += '0'
			print(ans)
main()


t = int(input())
ns = [list(map(int, input().split())) for _ in range(t)]
for (n0, n1, n2) in ns:
	if n1 == 0 and n2 == 0:
		ans = '0' * (n0 + 1)
	elif n1 % 2 == 0:
		ans = '10' * (n1 // 2) + '0' * n0 + '1' * (n2 + 1)
	else:
		ans = '0' * n0 + '01' * (n1 // 2) + '0' + '1' * (n2 + 1)
	print(ans)


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().strip().split(' '))

def msi():
	return map(str, input().strip().split(' '))

def li():
	return list(mi())

def dmain():
	sys.setrecursionlimit(100000000)
	threading.stack_size(40960000)
	thread = threading.Thread(target=main)
	thread.start()
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def getKey(item):
	return item[1]

def sort2(l):
	return sorted(l, key=getKey, reverse=True)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(max(n - r, 1)))

def ceil(x, y):
	if x % y == 0:
		return x // y
	else:
		return x // y + 1

def powerMod(x, y, p):
	res = 1
	x %= p
	while y > 0:
		if y & 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def read():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def main():
	for _ in range(ii()):
		(x, y, z) = mi()
		s = ''
		if z != 0:
			s += '11'
		for i in range(z - 1):
			s += '1'
		if z != 0:
			if y != 0:
				s = '0' + s
			p = '0'
			for i in range(y - 1):
				s += p
				if p == '0':
					p = '1'
				else:
					p = '0'
			if x != 0:
				if y != 0:
					s = '0' * x + s
				else:
					s = '0' * (x + 1) + s
		else:
			if y != 0:
				p = '0'
				for i in range(y + 1):
					s += p
					if p == '0':
						p = '1'
					else:
						p = '0'
			if x != 0:
				if y != 0:
					s = '0' * x + s
				else:
					s = '0' * (x + 1) + s
		print(s)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import os
import sys
from io import BytesIO, IOBase
import math
import itertools
import bisect
import heapq

def main():
	pass
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def binary(n):
	return bin(n).replace('0b', '')

def decimal(s):
	return int(s, 2)

def pow2(n):
	p = 0
	while n > 1:
		n //= 2
		p += 1
	return p

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(i)
			n = n / i
	if n > 2:
		l.append(int(n))
	return l

def isPrime(n):
	if n == 1:
		return False
	else:
		root = int(n ** 0.5)
		root += 1
		for i in range(2, root):
			if n % i == 0:
				return False
		return True

def maxPrimeFactors(n):
	maxPrime = -1
	while n % 2 == 0:
		maxPrime = 2
		n >>= 1
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			maxPrime = i
			n = n / i
	if n > 2:
		maxPrime = n
	return int(maxPrime)

def countcon(s, i):
	c = 0
	ch = s[i]
	for i in range(i, len(s)):
		if s[i] == ch:
			c += 1
		else:
			break
	return c

def lis(arr):
	n = len(arr)
	lis = [1] * n
	for i in range(1, n):
		for j in range(0, i):
			if arr[i] > arr[j] and lis[i] < lis[j] + 1:
				lis[i] = lis[j] + 1
	maximum = 0
	for i in range(n):
		maximum = max(maximum, lis[i])
	return maximum

def isSubSequence(str1, str2):
	m = len(str1)
	n = len(str2)
	j = 0
	i = 0
	while j < m and i < n:
		if str1[j] == str2[i]:
			j = j + 1
		i = i + 1
	return j == m

def maxfac(n):
	root = int(n ** 0.5)
	for i in range(2, root + 1):
		if n % i == 0:
			return n // i
	return n

def p2(n):
	c = 0
	while n % 2 == 0:
		n //= 2
		c += 1
	return c

def seive(n):
	primes = [True] * (n + 1)
	primes[1] = primes[0] = False
	for i in range(2, n + 1):
		if primes[i]:
			for j in range(i + i, n + 1, i):
				primes[j] = False
	p = []
	for i in range(0, n + 1):
		if primes[i]:
			p.append(i)
	return p

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p

def denofactinverse(n, m):
	fac = 1
	for i in range(1, n + 1):
		fac = fac * i % m
	return pow(fac, m - 2, m)

def numofact(n, m):
	fac = 1
	for i in range(1, n + 1):
		fac = fac * i % m
	return fac
for xyz in range(0, int(input())):
	(n0, n1, n2) = map(int, input().split())
	if n1 % 2:
		ans = '01' * (n1 // 2)
		ans += '0'
		ans += '0' * n0
		ans += '1' * (n2 + 1)
	elif n1 % 2 == 0 and n1 > 0:
		ans = '0'
		ans += '1' * (n2 + 1)
		ans += '0' * (n0 + 1)
		n1 -= 2
		ans += '10' * (n1 // 2)
	elif n0 == 0:
		ans = '1' * (n2 + 1)
	else:
		ans = '0' * (n0 + 1)
	print(ans)


m = int(input())
for i in range(m):
	(a, b, c) = map(int, input().split())
	mid = '01' * ((b - 1) // 2 + 1)
	left = '0' * a
	right = '1' * c
	if b % 2 == 0 and b > 0:
		right += '0'
	elif b == 0 and c != 0:
		right += '1'
	elif b == 0 and a != 0:
		left += '0'
	print(left + mid + right)


import math

def r():
	return map(int, input().split())

def l():
	return list(map(int, input().split()))

def i():
	return int(input())

def si():
	return input()

def pYes():
	print('YES')

def pNo():
	print('NO')

def plist(l):
	print(''.join(l))
t = int(input())
for i in range(t):
	(a, b, c) = map(int, input().split())
	res = ''
	if b > 1:
		res = '1' + '0' * (a + 1) + '1'
		b = b - 2
		if b % 2 == 0:
			for i in range(b):
				if i % 2 == 0:
					res = res + '0'
				else:
					res = res + '1'
			res = res + '1' * c
		else:
			for i in range(b - 1):
				if i % 2 == 0:
					res = res + '0'
				else:
					res = res + '1'
			res = res + '1' * c
			res = res + '0'
		print(res)
	else:
		if b == 1:
			res = '0' * (a + 1)
			res = res + '1' * (b + c)
		elif a == 0:
			res = res + '1' * (c + 1)
		else:
			res = res + '0' * (a + 1)
		print(res)


t = int(input())
for _ in range(t):
	(a, b, c) = list(map(int, input().split()))
	if b == 0:
		if c == 0:
			for i in range(a + 1):
				print('0', end='')
		elif a == 0:
			for i in range(c + 1):
				print('1', end='')
		print()
	elif b % 2 == 1:
		for i in range(a):
			print('0', end='')
		for i in range(b // 2 + 1):
			print('01', end='')
		for i in range(c):
			print('1', end='')
		print()
	else:
		for i in range(a):
			print('0', end='')
		for i in range(b // 2):
			print('01', end='')
		for i in range(c):
			print('1', end='')
		print('0')


t = int(input())
for test in range(t):
	(n0, n1, n2) = [int(x) for x in input().split()]
	if n1 % 2 == 0:
		ans = ''
		f = 0
		if n2 > 0:
			ans += '1' * (n2 + 1)
			f = 1
		if n0 > 0:
			ans += '0' * (n0 + 1)
			f += 1
		if f == 2:
			n1 -= 1
		while n1 > 0:
			if len(ans) > 0 and ans[-1] == '1':
				ans += '0'
				n1 -= 1
			else:
				if len(ans) > 0:
					n1 -= 1
				ans += '1'
		print(ans)
	else:
		ans = ''
		if n2 > 0:
			ans += '1' * (n2 + 1)
		while n1 > 0:
			if len(ans) > 0 and ans[-1] == '1':
				ans += '0'
				n1 -= 1
			else:
				if len(ans) > 0:
					n1 -= 1
				ans += '1'
		ans += '0' * n0
		print(ans)


def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())
entries = inp()
for i in range(entries):
	l = inlt()
	a = l[0]
	b = l[1]
	c = l[2]
	res = []
	if a == 0 and b != 0:
		res.append('0')
	if a != 0:
		for i in range(a + 1):
			res.append('0')
	for i in range((b - 1) // 2):
		res.append('1')
		res.append('0')
	if c != 0:
		for i in range(c + 1):
			res.append('1')
	if c == 0 and b != 0:
		res.append('1')
	if b != 0 and b % 2 == 0:
		res.append('0')
	ans = ''
	for x in res:
		ans += x
	print(ans)


import math
for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	l = []
	if z != 0:
		l += [1] * (z + 1)
	if x != 0:
		l += [0] * (x + 1)
	if y != 0:
		t = [1, 0]
		s = [0, 1]
		if x == 0 and z == 0:
			if y == 1:
				l += t * y
			elif y % 2 == 0:
				l += t * (y // 2) + [1]
			else:
				l += t * math.ceil(y / 2)
		elif x == 0:
			if y == 1:
				l += [0]
			elif y % 2 == 0:
				l += s * (y // 2)
			else:
				l += s * (y // 2) + [0]
		elif z == 0:
			if y == 1:
				l += [1]
			elif y % 2 == 0:
				l += t * (y // 2)
			else:
				l += t * (y // 2) + [1]
		elif y % 2 == 0:
			l += t * (y // 2 - 1) + [1]
		else:
			l += t * (y // 2)
	for i in l:
		print(i, end='')
	print()


def solve():
	(n0, n1, n2) = [int(x) for x in input().split()]
	res = []
	if not n1:
		if n0:
			res = ['0' for _ in range(n0 + 1)]
		else:
			res = ['1' for _ in range(n2 + 1)]
	else:
		res = ['0' if i & 1 else '1' for i in range(n1 + 1)]
		res[1:1] = ['0' for _ in range(n0)]
		res[0:0] = ['1' for _ in range(n2)]
	print(''.join(res))
for _ in range(int(input())):
	solve()


t = int(input())
for tt in range(t):
	(n0, n1, n2) = map(int, input().split())
	if n0 == 0 and n1 == 0:
		print('1' * (n2 + 1))
	elif n2 == 0 and n1 == 0:
		print('0' * (n0 + 1))
	else:
		ans = []
		for i in range(n0 + 1):
			ans.append('0')
		if n1 % 2 == 0:
			ans = ['1'] + ans
		for i in range((n1 + 1) // 2 - 1):
			ans.append('1')
			ans.append('0')
		for i in range(n2 + 1):
			ans.append('1')
		print(''.join(ans))


for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	b = [0 for i in range(n0 + 1)]
	if n1 % 2 == 0:
		for i in range(n1 // 2):
			b.append(1)
			b.append(0)
		if n2 > 0:
			b.pop()
			for i in range(n2):
				b.append(1)
			a = '1'
			for i in range(len(b)):
				a += str(b[i])
			print(a)
		else:
			a = ''
			for i in range(len(b)):
				a += str(b[i])
			print(a)
	else:
		for i in range(n1 // 2):
			b.append(1)
			b.append(0)
		b.append(1)
		for i in range(n2):
			b.append(1)
		a = ''
		for i in range(len(b)):
			a += str(b[i])
		print(a)


import sys

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def input():
	return sys.stdin.readline().strip()
for _ in range(int(input())):
	(n0, n1, n2) = get_ints()
	if n0 > 0 and n1 == 0 and (n2 == 0):
		for i in range(n0 + 1):
			print(0, end='')
		print()
		continue
	if n0 == 0 and n1 > 0 and (n2 == 0):
		o = 1
		for i in range(n1 + 1):
			print(o, end='')
			if o == 1:
				o = 0
			else:
				o = 1
		print()
		continue
	if n0 == 0 and n1 == 0 and (n2 > 0):
		for i in range(n2 + 1):
			print(1, end='')
		print()
		continue
	if n2 == 0 and n0 > 0 and (n1 > 0):
		if n1 % 2 == 0:
			o = 0
			for i in range(n1):
				print(o, end='')
				if o == 0:
					o = 1
				else:
					o = 0
			for i in range(n0 + 1):
				print(0, end='')
			print()
		else:
			o = 1
			for i in range(n1):
				print(o, end='')
				if o == 0:
					o = 1
				else:
					o = 0
			for i in range(n0 + 1):
				print(0, end='')
			print()
		continue
	if n2 > 0 and n1 > 0 and (n0 == 0):
		if n1 % 2 == 0:
			o = 1
			for i in range(n1):
				print(o, end='')
				if o == 0:
					o = 1
				else:
					o = 0
			for i in range(n2 + 1):
				print(1, end='')
			print()
		else:
			o = 0
			for i in range(n1):
				print(o, end='')
				if o == 0:
					o = 1
				else:
					o = 0
			for i in range(n2 + 1):
				print(1, end='')
			print()
		continue
	k = n1
	p = 1
	for i in range(k):
		print(p, end='')
		if p == 1:
			p = 0
		else:
			p = 1
	if p == 0:
		for i in range(n2):
			print(1, end='')
		for i in range(n0 + 1):
			print(0, end='')
	if p == 1:
		for i in range(n0):
			print(0, end='')
		for i in range(n2 + 1):
			print(1, end='')
	print()


import sys
import bisect
import heapq
from math import *
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
mod = pow(10, 9) + 7

def inp():
	return sys.stdin.readline().strip()

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def graph(vertex):
	return [[] for i in range(0, vertex + 1)]

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

def lcm(a, b):
	return a * b // gcd(a, b)

def dfs(v, visited, st, new):
	new.append(st)
	visited[st] = 1
	for i in v[st]:
		if visited[i] == 0:
			dfs(v, visited, i, new)

def s(a):
	g = 0
	for i in range(len(a)):
		g += a[i]
	return g

def solve():
	(n0, n1, n2) = sep()
	ans = ''
	if n0 > 0:
		ans += '0'
	ans += '0' * n0
	if n0 > 0:
		temp = 1
		for i in range(n1):
			ans += str(temp % 2)
			temp += 1
	elif n1 > 0:
		temp = 1
		ans += '0'
		for i in range(n1):
			ans += str(temp % 2)
			temp += 1
	if n2 > 0:
		if len(ans) > 0:
			if ans[len(ans) - 1] == '0':
				ans = '1' + ans
				ans = ans[:len(ans) - 1]
				ans += '1' * n2
			else:
				ans += '1' * n2
		else:
			ans += '1' * (n2 + 1)
	print(ans)
testcase(int(inp()))


t = int(input())
for _ in range(t):
	(n0, n1, n2) = map(int, input().split())
	N0 = n0
	N1 = n1
	N2 = n2
	x = []
	while N0 + N1 + N2 > 0:
		if N0 != 0:
			while N0 > 0:
				x.append(0)
				N0 -= 1
			x.append(0)
			if N1 != 0:
				while N1 > 0:
					if x[-1] == 0:
						x.append(1)
						N1 -= 1
						if N2 != 0:
							while N2 > 0:
								x.append(1)
								N2 -= 1
					else:
						x.append(0)
						N1 -= 1
			if N1 == 0:
				pass
		if N0 == 0:
			if N1 != 0:
				x.append(0)
				x.append(1)
				N1 -= 1
				if N2 != 0:
					while N2 > 0:
						x.append(1)
						N2 -= 1
				while N1 > 0:
					if x[-1] == 0:
						x.append(1)
						N1 -= 1
					else:
						x.append(0)
						N1 -= 1
			if N1 == 0:
				if N2 != 0:
					x.append(1)
					x.append(1)
					N2 -= 1
					while N2 > 0:
						x.append(1)
						N2 -= 1
	print(*x, sep='')


def convert(s):
	new = ''
	for x in s:
		new += x
	return new
t = int(input())
for i in range(t):
	m = []
	(a, b, c) = map(int, input().split())
	if b > 0:
		for i in range(a + 1):
			m.append('0')
		for i in range(c + 1):
			m.append('1')
		for i in range(b - 1):
			if i % 2 == 0:
				m.append('0')
			else:
				m.append('1')
	elif a > 0:
		for i in range(a + 1):
			m.append('0')
	else:
		for i in range(c + 1):
			m.append('1')
	print(convert(m))


for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	print(['0'[:1 - b % 2] + '10' * ((b - 1) // 2), ''][b == 0] + '1' * (c + (c + b != 0)) + '0' * (a + (a + b != 0)))


for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	s = []
	s.append('0' * n0)
	for i in range(n1 + n1 % 2):
		s.append(str(i % 2))
	s.append('1' * n2)
	s.append('' if n1 % 2 else '0')
	if not n0 + n1 and n2:
		s[-1] = '1'
	print(''.join(s))


T = int(input())
out = []
for m in range(T):
	(n_0, n_1, n_2) = map(int, input().split())
	if n_0 == 0:
		if n_1 == 0:
			out.append('1' * (n_2 + 1))
		else:
			s_1 = ''
			for i in range(n_1 + 1):
				if i % 2 == 0:
					s_1 = s_1 + '1'
				else:
					s_1 = s_1 + '0'
			out.append('1' * (n_2 + 1) + s_1[1:])
	elif n_1 != 0:
		s = ''
		s_0 = '0' * (n_0 + 1)
		s_2 = '1' * (n_2 + 1)
		s = s + s_0 + s_2
		s_1 = ''
		for i in range(n_1 + 1):
			if i % 2 == 0:
				s_1 = s_1 + '0'
			else:
				s_1 = s_1 + '1'
		s = s + s_1[2:]
		out.append(s)
	elif n_1 == 0:
		out.append('0' * (n_0 + 1))
for i in range(T):
	print(out[i])


for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	if b != 0:
		for i in range(a + 1):
			print('0', end='')
		for i in range(c + 1):
			print('1', end='')
		for i in range(b - 1):
			print(i & 1, end='')
		print()
	else:
		if c == 0:
			for i in range(a + 1):
				print('0', end='')
		else:
			for i in range(c + 1):
				print('1', end='')
		print()


t = int(input())
while t > 0:
	arr = [int(x) for x in input().split(' ')]
	(n0, n1, n2) = arr
	s = ''
	(c, d) = (0, 0)
	if n0 > 0:
		c = 1
		s += '0' * (n0 + 1)
	if n2 > 0:
		d = 1
		s += '1' * (n2 + 1)
	if n0 == 0 and n2 == 0:
		(c, d) = (1, 1)
		s += '01'
	if c + d == 2:
		for i in range(n1 - 1):
			s += str(i % 2)
	elif c == 1:
		for i in range(n1):
			s += str((i + 1) % 2)
	else:
		for i in range(n1):
			s += str(i % 2)
	print(s)
	t -= 1


import sys
from math import ceil
read = sys.stdin.buffer.readline
mi = lambda : map(int, read().split())
li = lambda : list(mi())
cin = lambda : int(read())
for _ in range(cin()):
	(n1, n2, n3) = mi()
	s = '0' * (n1 + (n1 > 0))
	if n2 > 0:
		n2 -= 1
		s += ['1', '01'][s == '']
		s += '01' * (n2 // 2)
		if n2 % 2 != 0:
			s = '1' + s
	s += ['1' * (n3 + 1), '1' * n3][s != '']
	print(s)


def one_case():
	(n0, n1, n2) = map(int, input().split())
	if n0 == 0 and n1 == 0:
		print((n2 + 1) * '1')
		return
	if n1 == 0 and n2 == 0:
		print((n0 + 1) * '0')
		return
	s = ''
	for i in range(n1 + 1):
		s = s + str((i + 1) % 2)
	s = '1' * n2 + s[0] + '0' * n0 + s[1:]
	print(s)
t = int(input())
for i in range(t):
	one_case()


for _ in range(int(input())):
	(n00, n01, n11) = map(int, input().split())
	if n00 and n11:
		n01 -= 1
	r = [0] * (n00 + 1 if n00 else 0) + [1] * (n11 + 1 if n11 else 0)
	if not r:
		r = [0]
	for _ in range(n01):
		r.append(1 - r[-1])
	print(*r, sep='')


t = int(input())
for k in range(t):
	(n0, n1, n2) = map(int, input().split())
	if not n1:
		if n0:
			print('0' * (n0 + 1))
		else:
			print('1' * (n2 + 1))
		continue
	ans = ''
	flag = 0
	if n1 % 2 == 0:
		n1 -= 1
		flag = 1
	for i in range(n1 + 1):
		if i % 2 == 0:
			ans += '1'
		else:
			ans += '0'
	ans += '0' * n0
	if flag:
		ans += '1'
	ans = '1' * n2 + ans
	print(ans)


import sys, bisect
from math import gcd
input = sys.stdin.readline

def inp():
	return int(input().rstrip())

def inlt():
	return list(map(int, input().rstrip().split()))

def insr():
	s = input().rstrip()
	return s[:len(s) - 1]

def invr():
	return map(int, input().rstrip().split())
t = inp()
for _ in range(t):
	(n0, n1, n2) = invr()
	if n1 == 0:
		if n0 == 0:
			ans = ['1' for i in range(n2 + 1)]
			print(''.join(ans))
		else:
			ans = ['0' for i in range(n0 + 1)]
			print(''.join(ans))
	else:
		ans = '' if n0 == 0 else '0'
		for i in range(n0):
			ans += '0'
		ans += '' if n2 == 0 else '1'
		for i in range(n2):
			ans += '1'
		turn = 0
		l = n1
		if n0 == 0 and n2 == 0:
			ans = '1'
		elif n0 != 0 and n2 != 0:
			l -= 1
		elif n2 == 0:
			turn = 1
		for i in range(l):
			ans += str(turn)
			turn = 1 if turn == 0 else 0
		print(ans)


from collections import Counter
from collections import defaultdict
import math
import sys
input = sys.stdin.readline
rs = lambda : input().strip()
ri = lambda : int(input())
rl = lambda : list(map(int, input().split()))
rls = lambda : list(map(str, input().split()))
from collections import deque
t = int(input())
for _ in range(0, t):
	(a, b, c) = rl()
	z = a
	zo = b
	o = c
	s = ''
	if z == 1:
		s = s + '00'
	elif z > 1:
		s = s + '0' + '0' * z
	if o == 1:
		if len(s) > 0 and s[-1] == '0':
			zo = zo - 1
		s = s + '11'
	elif o > 1:
		if len(s) > 0 and s[-1] == '0':
			zo = zo - 1
		s = s + '1' + '1' * o
	if o >= 1:
		k = '0'
	else:
		k = '1'
	if zo >= 1:
		if z == 0 and o == 0:
			s = s + '10'
			k = '1'
			zo = zo - 1
		for i in range(0, zo):
			s = s + k
			if k == '1':
				k = '0'
			else:
				k = '1'
	print(s)


for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	if b == 0:
		s1 = ''
		if c != 0:
			for i in range(c + 1):
				s1 += '1'
		s2 = ''
		if a != 0:
			for i in range(a + 1):
				s2 += '0'
		print(s1 + s2)
	else:
		s = ''
		for i in range(b + 1):
			if i % 2 == 0:
				s += '1'
			else:
				s += '0'
		s1 = ''
		for i in range(c):
			s1 += '1'
		s2 = ''
		for i in range(a):
			s2 += '0'
		final = s1 + s[:1] + s2 + s[1:]
		print(final)


count = int(input())
for i in range(count):
	numbers = input().split(' ')
	n0 = int(numbers[0])
	n1 = int(numbers[1])
	n2 = int(numbers[2])
	res = ''
	if n1 == 0:
		if n0 > 0:
			for j in range(n0 + 1):
				res += '0'
		else:
			for j in range(n2 + 1):
				res += '1'
	else:
		res = '01'
		n1 -= 1
		if n0 > 0:
			for j in range(n0):
				res = '0' + res
		if n2 > 0:
			for j in range(n2):
				res = res + '1'
		if n1 > 0:
			if n1 % 2 == 0:
				for j in range(n1 // 2):
					res = res + '01'
			else:
				for j in range(n1 // 2):
					res = res + '01'
				res = res + '0'
	print(res)


T = int(input())
r = 1
while r <= T:
	(n0, n1, n2) = map(int, input().split())
	if n1 == 0:
		if n0 > 0:
			ans = '0' * (n0 + 1)
		elif n2 > 0:
			ans = '1' * (n2 + 1)
		else:
			ans = '-1'
	else:
		ans = '0' * n0
		if n1 % 2 == 0:
			ans = '1' + ans
			n1 -= 1
		ans += '01'
		ans += '01' * (n1 // 2)
		ans += '1' * n2
	print(ans)
	r += 1


def build(s, n0, n1, n2):
	s1 = s
	if s[-1] == '0':
		if n0 != 0:
			s1 = build(s + '0', n0 - 1, n1, n2)
		if n1 != 0 and len(s1) - len(s) != n0 + n1 + n2:
			s1 = build(s + '1', n0, n1 - 1, n2)
	if s[0] == '0' and len(s1) - len(s) != n0 + n1 + n2:
		if n0 != 0:
			s1 = build('0' + s, n0 - 1, n1, n2)
		if n1 != 0 and len(s1) - len(s) != n0 + n1 + n2:
			s1 = build('1' + s, n0, n1 - 1, n2)
	if s[-1] == '1' and len(s1) - len(s) != n0 + n1 + n2:
		if n1 != 0:
			s1 = build(s + '0', n0, n1 - 1, n2)
		if n2 != 0 and len(s1) - len(s) != n0 + n1 + n2:
			s1 = build(s + '1', n0, n1, n2 - 1)
	if s[0] == '1' and len(s1) - len(s) != n0 + n1 + n2:
		if n1 != 0:
			s1 = build('0' + s, n0, n1 - 1, n2)
		if n2 != 0 and len(s1) - len(s) != n0 + n1 + n2:
			s1 = build('1' + s, n0, n1, n2 - 1)
	return s1 if len(s1) - len(s) == n0 + n1 + n2 else s
ncases = int(input())
for i in range(0, ncases):
	(n0, n1, n2) = input().split()
	n0 = int(n0)
	n1 = int(n1)
	n2 = int(n2)
	if n0 != 0:
		s = build('00', n0 - 1, n1, n2)
	elif n1 != 0:
		s = build('10', n0, n1 - 1, n2)
		if len(s) < n0 + n1 + n2:
			s = build('01', n0, n1 - 1, n2)
	else:
		s = build('11', n0, n1, n2 - 1)
	print(s)


import collections
t = int(input())
for _ in range(t):
	(n0, n1, n2) = map(int, input().split())
	if n1 == 0:
		if n0:
			print('0' * (n0 + 1))
		else:
			print('1' * (n2 + 1))
		continue
	ans = collections.deque()
	alt = 0
	for __ in range(n1 + 1):
		ans.append(alt)
		alt = 1 - alt
	for __ in range(n0):
		ans.appendleft(0)
	popped = False
	if ans and ans[-1] == 0:
		popped = True
		ans.pop()
	for __ in range(n2):
		ans.append(1)
	if popped:
		ans.append(0)
	print(''.join(map(str, ans)))


t = int(input())
for _ in range(t):
	(n0, n1, n2) = map(int, input().split())
	ans = list()
	if n0 > 0:
		for i in range(n0 + 1):
			ans.append(0)
	if n1 > 0:
		if len(ans) == 0:
			ones = True
			for i in range(n1 + 1):
				if ones:
					ans.append(1)
				else:
					ans.append(0)
				ones = not ones
		else:
			ones = True
			for i in range(n1):
				if ones:
					ans.append(1)
				else:
					ans.append(0)
				ones = not ones
	if n2 > 0:
		if len(ans) == 0:
			for i in range(n2 + 1):
				ans.append(1)
		elif ans[-1] == 1:
			for i in range(n2):
				ans.append(1)
		else:
			ans.pop()
			for i in range(n2):
				ans.append(1)
			ans.append(0)
	for bit in ans:
		print(bit, end='')
	print()


numcases = int(input())
for i in range(numcases):
	(n1, n2, n3) = map(int, input().split())
	ans = '0'
	if n2 != 0:
		if n1 + n3 != 0:
			for i in range(n1):
				ans = ans + '0'
			ans = ans + '1'
			for i in range((n2 - 1) // 2):
				ans = ans + '01'
			for i in range(n3):
				ans = ans + '1'
			if n2 % 2 == 0:
				ans = ans + '0'
			print(ans)
		else:
			ans = '0'
			count = 0
			for i in range(n2):
				if count == 0:
					ans = ans + '1'
					count = 1
				else:
					ans = ans + '0'
					count = 0
			print(ans)
	else:
		if n1 == 0:
			ans = '1' * (n3 + 1)
		else:
			ans = '0' * (n1 + 1)
		print(ans)


import sys

def minp():
	return sys.stdin.readline().strip()

def mint():
	return int(minp())

def mints():
	return map(int, minp().split())

def solve():
	n = list(mints())
	if n[1] == 0:
		if n[0] != 0:
			if n[2] != 0:
				raise Exception('wut')
			print('0' * (n[0] + 1))
		else:
			print('1' * (n[2] + 1))
	else:
		x = n[1] - 1
		print('0' * (n[0] + 1) + '1' * (n[2] + 1) + '01' * (x // 2) + '010'[:x % 2])
for i in range(mint()):
	solve()


def main():
	(n0, n1, n2) = map(int, input().split())
	ans = ''
	if n0 > 0:
		ans += '0'
		for i in range(n0):
			ans += '0'
	if n2 > 0:
		if n1 > 0 and len(ans) > 0:
			n1 -= 1
		ans += '1'
		for i in range(n2):
			ans += '1'
	if n1 > 0:
		if len(ans) == 0:
			ans += '1'
		add = '0'
		if ans[-1] == '0':
			add = '1'
		for i in range(n1):
			ans += add
			if add == '1':
				add = '0'
			else:
				add = '1'
	print(ans)
	return

def test():
	t = int(input())
	while t:
		main()
		t -= 1
test()


def run():
	Ns = list(map(int, input().split()))
	if Ns[0] == 0 and Ns[2] == 0:
		bit = 1
		print('0', end='')
		for _ in range(Ns[1]):
			print(bit, end='')
			bit = 1 - bit
		print('')
		return
	elif Ns[0] == 0 and Ns[1] == 0:
		print('1', end='')
		for _ in range(Ns[2]):
			print('1', end='')
		print('')
		return
	elif Ns[1] == 0 and Ns[2] == 0:
		print('0', end='')
		for _ in range(Ns[0]):
			print('0', end='')
		print('')
		return
	elif Ns[0] == 0:
		bit = 1 - Ns[1] % 2
		print(bit, end='')
		for _ in range(Ns[1]):
			bit = 1 - bit
			print(bit, end='')
		for _ in range(Ns[2]):
			print('1', end='')
		print('')
	elif Ns[1] == 0:
		raise
		return
	elif Ns[2] == 0:
		bit = Ns[1] % 2
		print(bit, end='')
		for _ in range(Ns[1]):
			bit = 1 - bit
			print(bit, end='')
		for _ in range(Ns[0]):
			print('0', end='')
		print('')
	else:
		if Ns[1] % 2 == 0:
			print('1', end='')
			Ns[1] -= 1
		print('0', end='')
		for _ in range(Ns[0]):
			print('0', end='')
		bit = 1
		for _ in range(Ns[1] - 1):
			print(bit, end='')
			bit = 1 - bit
		print('1', end='')
		for _ in range(Ns[2]):
			print('1', end='')
		print('')
T = int(input())
for i in range(T):
	run()


t = int(input())
while t > 0:
	[n0, n1, n2] = [int(i) for i in input().split()]
	l = []
	if n0 == 0 and n2 != 0:
		for i in range(n2 + 1):
			l.append(1)
	elif n2 == 0 and n0 != 0:
		for i in range(n0 + 1):
			l.append(0)
	else:
		for i in range(n2 + 1):
			l.append(1)
		for i in range(n0 + 1):
			l.append(0)
		n1 -= 1
	while n1 > 0:
		if l[len(l) - 1] == 0:
			l.append(1)
			n1 -= 1
		else:
			l.append(0)
			n1 -= 1
	print(''.join((str(i) for i in l)))
	t -= 1


test = int(input())
for t in range(test):
	(n0, n1, n2) = map(int, input().split(' '))
	n11 = n1
	n22 = n2
	if n11 != 0:
		s = '1' + (n0 + 1) * '0'
		n11 -= 1
		if n11 != 0:
			s += '1'
			n11 -= 1
		while n11 > 1:
			s += '01'
			n11 -= 2
		if n11 > 0:
			s += '0'
		s = '1' * n2 + s
		print(s)
	elif n2 == 0:
		print((n0 + 1) * '0')
	else:
		print((n2 + 1) * '1')


for _ in ' ' * int(input()):
	(a, b, c) = map(int, input().split())
	from math import ceil as d
	if b + c == 0:
		print('0' * (a + 1))
		continue
	if a + b == 0:
		print('1' * (c + 1))
		continue
	if b & 1:
		print(('0' * a if b else '0' * (a + 1)) + '01' * d(b / 2) + ('1' * c if b else '1' * (c + 1)))
		continue
	print(('0' * a if b else '0' * (a + 1)) + '01' * d((b - 1) / 2) + ('1' * c if b else '1' * (c + 1)) + ('0' if b else ''))


from sys import stdin
from collections import deque
mod = 10 ** 9 + 7
import sys
import random
from queue import PriorityQueue
from bisect import bisect_right
from bisect import bisect_left
from collections import defaultdict
from math import sqrt, factorial, gcd, log2, inf, ceil
import heapq
input = lambda : sys.stdin.readline().rstrip()
from sys import stdin, stdout
from heapq import heapify, heappush, heappop
from itertools import permutations
from math import factorial as f

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p
import sys
t = int(input())
for _ in range(t):
	(no, n1, n2) = map(int, input().split())
	if no == n1 == n2 == 0:
		print('')
		continue
	ans = ''
	if no != 0:
		ans += '0' * (no + 1)
	if n1 == n2 == 0:
		print(ans)
		continue
	k1 = []
	cnt = 0
	if ans == '':
		n1 += 1
	while n1 != 1 and n1 != 0:
		if cnt % 2 == 0:
			k1.append('1')
		else:
			k1.append('0')
		n1 -= 1
		cnt += 1
	k1.reverse()
	k1 += list(ans)
	if k1 == []:
		print('1' * (n2 + 1))
	else:
		if k1[0] == '0':
			z = '1' * (n2 + 1) + ''.join(k1)
			n1 -= 1
		else:
			z = '1' * n2 + ''.join(k1)
		if n1 <= 0:
			print(z)
		else:
			print('0' + z)


import random
t = int(input())
for _ in range(t):
	(n1, n2, n3) = map(int, input().split())
	ans = []
	if n1 or n2:
		ans.append((n1 + 1) * '0')
	if n2 or n3:
		ans.append((n3 + 1) * '1')
	while n2 - 1 > 0:
		ans.append('0' if ans[-1][-1] == '1' else '1')
		n2 -= 1
	print(''.join(ans))


import sys

def input():
	return sys.stdin.readline()[:-1]
t = int(input())
for _ in range(t):
	(a, b, c) = map(int, input().split())
	if b == 0:
		if a == 0:
			print('1' * (c + 1))
		else:
			print('0' * (a + 1))
		continue
	if b % 2 == 1:
		s = '01' * ((b - 1) // 2)
	else:
		s = '1' + '01' * (b // 2 - 1)
	s += '0' * (a + 1)
	s += '1' * (c + 1)
	print(s)


test_cases = int(input())
for _ in range(test_cases):
	(n0, n1, n2) = map(int, input().split(' '))
	result = []
	if n1:
		result += [0, 1]
		n1 -= 1
	result += [0, 1] * (n1 // 2)
	n1 %= 2
	if n2:
		if not result or (result and result[-1] != 1):
			result += [1, 1]
			n2 -= 1
		result += [1] * n2
		n2 = 0
	if n1:
		result += [0]
		n1 -= 1
	if n0:
		if not result or (result and result[0] != 0):
			result = [0, 0] + result
			n0 -= 1
		result = [0] * n0 + result
		n0 = 0
	print(''.join([str(bit) for bit in result]))


t = int(input())
for i in range(t):
	(m, n, k) = map(int, input().split())
	a = ''
	f = 0
	if k != 0:
		a = a + '1'
		f = 1
		while k != 0:
			a = a + '1'
			k = k - 1
	if m != 0:
		a = a + '0'
		if f == 1:
			n = n - 1
		while m != 0:
			a = a + '0'
			m = m - 1
		f = 1
	if f == 0 and n != 0:
		a = a + '0'
	while n != 0:
		a = a + str(int(a[-1]) ^ 1)
		n = n - 1
	print(a)


for _ in range(int(input())):
	(c, b, a) = list(map(int, input().split()))
	ans = ''
	if c > 0:
		ans += '0'
	elif b > 0:
		ans += '0'
		flag = 1
	else:
		ans += '1'
	while c > 0:
		ans += '0'
		c -= 1
	kek = 0
	flag = 0
	if b % 2 == 0 and b != 0:
		b -= 1
		kek = 1
	while b > 0:
		if flag == 0:
			ans += '1'
			flag = 1
		else:
			ans += '0'
			flag = 0
		b -= 1
	while a > 0:
		ans += '1'
		a -= 1
	if kek:
		if a > 0:
			ans += '0'
		else:
			ans = '1' + ans
	print(ans)


def build_binary_str(p, q, r):
	ans = []
	if q == 0:
		if p != 0 and q != 0:
			return '-1'
		elif p:
			ans.insert(0, ['0' for i in range(1, p + 2)])
		else:
			ans.insert(0, ['1' for i in range(1, r + 2)])
	else:
		for i in range(1, q + 2):
			if i % 2 == 0:
				ans += '0'
			else:
				ans += '1'
		ans.insert(1, ['0' for i in range(p)])
		ans.insert(0, ['1' for i in range(r)])
	return ''.join([str(''.join(i)) for i in ans])
t = int(input())
while t != 0:
	t -= 1
	(p, q, r) = map(int, input().split())
	print(build_binary_str(p, q, r))


num = int(input())
for _ in range(num):
	(a, b, c) = [int(i) for i in input().split()]
	if a == 0 and b == 0:
		print('1' * (c + 1))
		continue
	if c == 0 and b == 0:
		print('0' * (a + 1))
		continue
	if a == 0 and c == 0 and (b != 0):
		ans = '1'
		last = '1'
		for i in range(b):
			if last == '0':
				ans += '1'
				last = '1'
			else:
				ans += '0'
				last = '0'
		print(ans)
		continue
	ans = '0' * (a + 1)
	if b % 2 == 1:
		ans += '1' + '01' * (b // 2) + '1' * c
	else:
		ans += '1' * c + '10' * (b // 2)
	print(ans)


q = int(input())
for i in range(q):
	(a, c, b) = [int(i) for i in input().split()]
	if c > 0:
		s = '10'
		if c % 2 == 0:
			s += '10' * max((c - 1) // 2, 0) + '1'
		else:
			s += '10' * max((c - 1) // 2, 0)
		s = s[0] * (b + 1) + s[1] * (a + 1) + s[2:]
		print(s)
	elif a > 0:
		print('0' * (a + 1))
	else:
		print('1' * (b + 1))


import sys
ints = (int(x) for x in sys.stdin.read().split())
sys.setrecursionlimit(3000)

def main():
	ntc = next(ints)
	for tc in range(ntc):
		(a, b, c) = (next(ints) for i in range(3))
		ans = []
		while 1:
			if a > 0:
				x = '0'
			elif c > 0:
				x = '1'
			elif b > 0:
				x = '0' if not ans or ans[-1] == '1' else '1'
			else:
				break
			if ans:
				if ans[-1] != x:
					b -= 1
				elif x == '0':
					a -= 1
				else:
					c -= 1
			ans.append(x)
		print(''.join(ans))
	return
main()


from sys import stdin, stdout
from itertools import combinations
from collections import defaultdict, Counter
import math

def listIn():
	return list(map(int, stdin.readline().strip().split()))

def stringListIn():
	return [x for x in stdin.readline().split()]

def intIn():
	return int(stdin.readline())

def stringIn():
	return stdin.readline().strip()
t = int(input())
while t > 0:
	t -= 1
	(a, b, c) = listIn()
	s = ''
	if a > 0:
		s += '0' * (a + 1)
	if c > 0:
		s += '1' * (c + 1)
	if a > 0 and c > 0:
		b -= 1
		if b % 2 == 0:
			extra = '01' * (b // 2)
		else:
			extra = '1' + '01' * (b // 2)
		s = extra + s
	elif a == 0:
		if c != 0:
			extra = '01' * (b // 2)
			s += extra
			if b % 2 != 0:
				s += '0'
		elif b % 2 != 0:
			s = '01' * ((b + 1) // 2)
		else:
			s = '01' * (b // 2)
			s += '0'
	else:
		extra = '10' * (b // 2)
		s += extra
		if b % 2 != 0:
			s += '1'
	print(s)


for qq in range(int(input())):
	(a, b, c) = map(int, input().split())
	ans = ''
	if a:
		ans += '0' * (a + 1)
	if c:
		ans += '1' * (c + 1)
	tu = c > 0
	i = (a > 0 and c > 0) - (a == 0 and c == 0)
	while i < b:
		tu ^= 1
		ans += '01'[tu]
		i += 1
	print(ans)


for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	s = []
	c = 0
	if n1 > 0:
		for i in range(n1 + 1):
			s.append('0' if i & 1 else '1')
		s.insert(1, '0' * n0)
		s.insert(0, '1' * n2)
	elif n0 > 0:
		s.append('0' * (n0 + 1))
	else:
		s.append('1' * (n2 + 1))
	print(''.join(s))


t = int(input())
for _ in range(t):
	(n0, n1, n2) = map(int, input().split())
	if n1 % 2 == 1:
		ans = '0' * (n0 + 1)
		for i in range(n1):
			ans += str(1 - int(ans[-1]))
		ans += '1' * n2
		print(ans)
	else:
		if n0 == 0:
			ans = '1' * (n2 + 1)
			for i in range(n1):
				ans += str(1 - int(ans[-1]))
		elif n2 == 0:
			ans = '0' * (n0 + 1)
			for i in range(n1):
				ans += str(1 - int(ans[-1]))
		else:
			ans = '10'
			n1 -= 1
			ans += '0' * n0
			for i in range(n1):
				ans += str(1 - int(ans[-1]))
			ans += '1' * n2
		print(ans)


tim = {'00': 0, '01': 1, '10': 1, '11': 2}

def binary_find():

	def dfs(s, i, j, k):
		if i > n0 or j > n1 or k > n2:
			return False
		if i == n0 and j == n1 and (k == n2):
			print(s)
			return True
		for new in range(2):
			temp = s[-1] + str(new)
			if temp == '00':
				found = dfs(s + str(new), i + 1, j, k)
			elif temp in ['01', '10']:
				found = dfs(s + str(new), i, j + 1, k)
			else:
				found = dfs(s + str(new), i, j, k + 1)
			if found:
				return True
	(n0, n1, n2) = [int(x) for x in input().split()]
	if not dfs('0', 0, 0, 0):
		dfs('1', 0, 0, 0)
t = int(input())
for i in range(t):
	binary_find()


import sys
input = sys.stdin.readline
t = int(input())
while t:
	t -= 1
	(a, b, c) = map(int, input().split())
	s1 = '0'
	s2 = '01'
	s3 = '1'
	if b == 0:
		a = a + 1 if a else 0
		c = c + 1 if c else 0
		print(s1 * a + s3 * c)
	else:
		if b % 2:
			b = (b + 1) // 2
			ans = s1 * a + s2 * b + s3 * c
		else:
			b = b // 2
			ans = s1 * a + s2 * b + s3 * c
			if a == 0:
				ans = '1' + ans
			else:
				ans = ans + '0'
		print(ans)


t = int(input())
for _ in range(t):
	(n0, n1, n2) = list(map(int, input().split()))
	if n1 == 0:
		if n0 == 0:
			print('1' * (n2 + 1))
			continue
		else:
			print('0' * (n0 + 1))
			continue
	s0 = '0' * (n0 + 1)
	s2 = '1' * (n2 + 1)
	s1 = '01' * (n1 // 2)
	if n1 % 2 == 0:
		s1 = s1[:-1]
	print(s0 + s2 + s1)


import collections
from sys import stdin
input = stdin.readline

def main():
	test = int(input())
	for t in range(test):
		l = [int(i) for i in input().split(' ')]
		a = l[0]
		b = l[1]
		c = l[2]
		s = ''
		if c > 0 or b > 0:
			s = (c + 1) * '1'
		flag = False
		while b > 0:
			if not flag:
				s += '0'
			else:
				s += '1'
			flag = not flag
			b -= 1
		if a > 0:
			if len(s) > 0:
				if s[-1] == '1':
					s = s[:len(s) - 1] + a * '0' + '1'
				else:
					s += a * '0'
			else:
				s += (a + 1) * '0'
		print(s)
main()


t = int(input())
for i in range(0, t):
	l = input().strip().split()
	(n0, n1, n2) = [int(x) for x in l]
	if n1 == 0:
		if n0 > 0:
			print((n0 + 1) * '0')
		else:
			print((n2 + 1) * '1')
	else:
		ans = (n0 + 1) * '0' + (n2 + 1) * '1'
		for i in range(n1 - 1):
			if i % 2 == 0:
				ans += '0'
			else:
				ans += '1'
		print(ans)


t = int(input())
for kek in range(t):
	(n1, n2, n3) = map(int, input().split())
	N1 = n1
	N2 = n2
	N3 = n3
	s = ''
	if n1 != 0:
		s = '00'
		n1 -= 1
	elif n3 != 0:
		s = '11'
		n3 -= 1
	elif n2 != 0:
		s = '01'
		n2 -= 1
	while n1 != 0 or n2 != 0 or n3 != 0:
		if s[-1] == '0':
			if n1 != 0:
				s += '0'
				n1 -= 1
			elif n2 != 0:
				s += '1'
				n2 -= 1
		elif n3 != 0:
			s += '1'
			n3 -= 1
		elif n2 != 0:
			s += '0'
			n2 -= 1
	print(s)


t = int(input())
while t > 0:
	(a, b, c) = map(int, input().split())
	st = ''
	if a > 0:
		st += '0' * (a + 1)
	if c > 0:
		st += '1' * (c + 1)
	if a > 0 and c > 0:
		b -= 1
	if len(st) == 0:
		st += '01' * ((b + 1) // 2)
		if b % 2 == 0:
			st += '0'
	elif st[-1] == '0':
		st += '10' * (b // 2)
		if b % 2 == 1:
			st += '1'
	elif st[-1] == '1':
		st += '01' * (b // 2)
		if b % 2 == 1:
			st += '0'
	print(st)
	t -= 1


import sys

def solve(n0, n1, n2):
	func = lambda x: x
	if n1 == 0:
		res = list(map(func, ['1' for _ in range(n2 + 1)])) if n2 > 0 else []
		zeros = list(map(func, ['0' for _ in range(n0 + 1)])) if n0 > 0 else []
		res.extend(zeros)
	else:
		res = list(map(func, ['1' for _ in range(n2 + 1)]))
		zeros = list(map(func, ['0' for _ in range(n0 + 1)]))
		mixed = list(map(func, ['1' if x % 2 == 0 else '0' for x in range(n1 - 1)]))
		res.extend(zeros)
		res.extend(mixed)
	return ''.join(res)
number_loops = int(input())
for _ in range(number_loops):
	(n0, n1, n2) = list(map(int, input().split()))
	print(solve(n0, n1, n2))


for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	flag = False
	if n0 > 0:
		if not flag:
			print('00', end='')
			temp = 0
			flag = True
	n0 -= 2
	while n0 >= 0:
		print('0', end='')
		n0 -= 1
	if n1 > 0:
		if not flag:
			print('01', end='')
			temp = 1
			n1 -= 1
			flag = True
		else:
			print('1', end='')
			temp = 1
			n1 -= 1
	while n2 > 0:
		if not flag:
			print('11', end='')
			temp = 1
			n2 -= 1
			flag = True
		else:
			print('1', end='')
			temp = 1
			n2 -= 1
			flag = True
	while n1 > 0:
		if not flag:
			print('01', end='')
			temp = 1
			n1 -= 1
			flag = True
		elif temp == 1:
			print('0', end='')
			temp = 0
		else:
			print('1', end='')
			temp = 1
		n1 -= 1
	print()


for _ in range(int(input())):
	(zero, one, two) = [int(x) for x in input().split()]
	if one == 0:
		if zero == 0:
			print(''.join(['1'] * (two + 1)))
		else:
			print(''.join(['0'] * (zero + 1)))
	else:
		array = []
		for i in range(one + 1):
			if i % 2 == 0:
				array.append('1')
			else:
				array.append('0')
		print(''.join(['1'] * two + [str(array[0])] + ['0'] * zero + array[1:]))


for i in range(int(input())):
	(n1, n2, n3) = map(int, input().split())
	ans = []
	for i in range(n3):
		ans.append('1')
	for i in range(0, n2, 2):
		ans.append('1')
		ans.append('0')
	for i in range(n1):
		ans.append('0')
	if n2 == 0:
		ans.append(ans[-1])
	elif n2 % 2 == 0:
		ans.append('1')
	print(''.join(ans))


for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	if n1 == 0:
		if n2 == 0:
			s = '0' * (n0 + 1)
		elif n0 == 0:
			s = '1' * (n2 + 1)
		print(s)
		continue
	s = '0' * (n0 + 1)
	n1 -= 1
	s = s + '1' * (n2 + 1)
	i = 0
	while n1 > 0:
		if s[-1] == '1':
			s = s + '0'
		else:
			s = s + '1'
		n1 -= 1
	print(s)


import sys
input = sys.stdin.readline
t = int(input())
for r in range(t):
	(n0, n1, n2) = map(int, input().split())
	ans = ''
	if n1 == 0:
		if n2 != 0:
			ans += '1'
		elif n0 != 0:
			ans += '0'
	else:
		for i in range(n1 + 1):
			if i % 2 == 0:
				ans += '1'
			else:
				ans += '0'
	temp = ''
	for i in range(n0):
		temp += '0'
	ans = ans[0] + temp + ans[1:]
	temp2 = ''
	for i in range(n2):
		temp2 += '1'
	ans = temp2 + ans
	print(ans)


t = int(input())
while t:
	t -= 1
	(n0, n1, n2) = map(int, input().split())
	ans = ''
	if n0 > 0:
		ans += '0' * (n0 + 1)
	if n1 > 0:
		if ans == '':
			a = n1 + 1
			flag = '1'
			while a:
				a -= 1
				if flag == '1':
					ans += '0'
					flag = '0'
				else:
					ans += '1'
					flag = '1'
		else:
			flag = '0'
			a = n1
			while a:
				a -= 1
				if flag == '1':
					ans += '0'
					flag = '0'
				else:
					ans += '1'
					flag = '1'
	if n2 > 0:
		if ans == '':
			ans += '1' * (n2 + 1)
		elif ans[-1] == '1':
			ans += '1' * n2
		elif n1 & 1 == 0:
			ansl = list(ans)
			ansl[-1] = '1'
			ans = ''
			for i in ansl:
				ans += i
			ans += '1' * (n2 - 1)
			ans += '0'
		else:
			ans += '1' * (n2 + 1)
	print(ans)


t = int(input())
out = ''
while t > 0:
	t -= 1
	(a, b, c) = [int(i) for i in input().split(' ')]
	if b == 0:
		if a == 0:
			out += '1' * (c + 1) + '\n'
			continue
		out += '0' * (a + 1) + '\n'
		continue
	answer = []
	prev = 0
	for i in range(b + 1):
		answer.append(1 - prev)
		prev = answer[-1]
	for i in range(a):
		answer.insert(1, 0)
	for i in range(c):
		answer.insert(0, 1)
	out += ''.join((str(i) for i in answer)) + '\n'
print(out)


for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	a = ''
	if n1 > 0 or n2 > 0:
		a += (n2 + 1) * '1' + (n0 + 1) * '0' + '1'
		if n1 // 2 - 1 >= 0:
			a += (n1 // 2 - 1) * '01'
		else:
			a = a[:-2]
		if n1 & 1 == 1:
			a += '0'
	else:
		a = '0' * (n0 + 1)
	print(a)


def bsr(a):
	s = ''
	b = ''
	c = ''
	if a[1] == 0:
		if a[0] != 0:
			b = '0'
			b = b * (a[0] + 1)
		if a[2] != 0:
			c = '1'
			c = c * (a[2] + 1)
		print(b + c)
		return
	if a[1] != 0:
		b = '0'
		c = '1'
		b = b * a[0]
		c = c * a[2]
		for i in range(a[1] + 1):
			if i % 2 == 0:
				s = s + '1'
			else:
				s = s + '0'
	i = s.find('0')
	o = s[:i] + b + s[i:]
	i = o.find('1')
	p = o[:i] + c + o[i:]
	print(p)
	return
t = int(input())
for i in range(t):
	T = input()
	l = list(map(int, T.split()))
	bsr(l)


T = int(input())

def compute_n(s):
	n0 = 0
	n1 = 0
	n2 = 0
	for i in range(len(s) - 1):
		p = s[i:i + 2]
		if p == '00':
			n0 += 1
		elif p == '11':
			n2 += 1
		else:
			n1 += 1
	return (n0, n1, n2)

def ans(n0, n1, n2):
	ret = ''
	num_domains = n1 + 1
	if num_domains == 1:
		assert n0 * n2 == 0
		if n0 == 0:
			return '1' * (n2 + 1)
		elif n2 == 0:
			return '0' * (n0 + 1)
	ret += '0' * (n0 + 1)
	ret += '1' * (n2 + 1)
	num_domains -= 2
	next = 0
	while num_domains > 0:
		ret += str(next)
		next = 1 - next
		num_domains -= 1
	return ret
for t in range(T):
	(n0, n1, n2) = input().split(' ')
	n0 = int(n0)
	n1 = int(n1)
	n2 = int(n2)
	r = ans(n0, n1, n2)
	print(r)


for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	if n1 + n2 == 0:
		print('0' * (n0 + 1))
		continue
	res = []
	if n1 % 2 == 0 and n1 > 0:
		res.append(0)
		n1 -= 1
	res += (n2 + 1) * [1]
	for i in range(n1):
		res.append(i % 2)
	res += n0 * [0]
	print(''.join(map(str, res)))


import sys
input = sys.stdin.readline
from collections import deque
t = int(input())
for _ in range(t):
	(n0, n1, n2) = map(int, input().split())
	front = '0' * (n0 + 1)
	back = '1' * (n2 + 1)
	if n0 == 0 and n1 == 0:
		print(back)
		continue
	if n2 == 0 and n1 == 0:
		print(front)
		continue
	elif n1 % 2 == 0:
		back += '0'
		n1 -= 1
	middle = '10' * ((n1 - 1) // 2)
	print(front + middle + back)


t = int(input())
for _ in range(t):
	(n0, n1, n2) = map(int, input().split())
	ans = []
	if n1 == 0:
		if n0 == 0:
			print('1' * (n2 + 1))
		else:
			print('0' * (n0 + 1))
		continue
	for _ in range(n0 + 1):
		ans.append('0')
	for _ in range(n2 + 1):
		ans.append('1')
	for i in range(n1 - 1):
		if i % 2 == 0:
			ans.append('0')
		else:
			ans.append('1')
	print(''.join(ans))


def solve():
	(z, o, t) = [int(el) for el in input().split()]
	if o == 0:
		if z != 0:
			return '0' * (z + 1)
		if t != 0:
			return '1' * (t + 1)
	ans = '0' * (z + 1) + '1' * (t + 1)
	o -= 1
	while o:
		if ans[-1] == '1':
			ans += '0'
		else:
			ans += '1'
		o -= 1
	return ans
for t in range(1, int(input()) + 1):
	print(solve())


for _ in range(int(input())):
	(a, b, c) = [int(i) for i in input().split(' ')]
	print('0' * (a + int(not b and (not c))) + '01' * ((b + 1) // 2) + '1' * (c + int(not b and (not a))) + '0' * ((b + 1) % 2) * int(not not b))


t = int(input())

def solve():
	(n1, n2, n3) = map(int, input().split())
	ans = ''
	if n1 + n2 >= 1:
		if n2 % 2 == 1:
			ans += '0' * (n1 + 1)
			for i in range(n2):
				if i % 2 == 0:
					ans += '1'
				else:
					ans += '0'
			ans += '1' * n3
		elif n2 % 2 == 0:
			if n2 != 0:
				ans += '1'
			ans += '0' * (n1 + 1)
			for i in range(n2 - 1):
				if i % 2 == 0:
					ans += '1'
				else:
					ans += '0'
			ans += '1' * n3
	else:
		ans += '1' * (n3 + 1)
	return ans
ans = []
for i in range(t):
	ans.append(solve())
for a in ans:
	print(a)


import sys
buff_readline = sys.stdin.buffer.readline
readline = sys.stdin.readline
INF = 2 ** 62 - 1

def read_int():
	return int(buff_readline())

def read_int_n():
	return list(map(int, buff_readline().split()))

def read_float():
	return float(buff_readline())

def read_float_n():
	return list(map(float, buff_readline().split()))

def read_str():
	return readline().strip()

def read_str_n():
	return readline().strip().split()

def error_print(*args):
	print(*args, file=sys.stderr)

def verify(s):
	from collections import Counter
	c = Counter()
	for i in range(len(s) - 1):
		c[s[i:i + 2].count('1')] += 1
	return c

def slv(N0, N1, N2):
	ans = '0' * N0
	if N0 != 0 and N1 % 2 == 0:
		ans += '0'
	if N1 % 2 == 0:
		if N0 == 0 and N1 != 0:
			ans += '0'
		ans += '10' * (N1 // 2 - 1)
	else:
		ans += '01' * (N1 // 2 + 1)
	ans += '1' * N2
	if N2 != 0 and N1 % 2 == 0:
		ans += '1'
	if N1 != 0 and N1 % 2 == 0:
		if N2 == 0:
			ans += '10'
		else:
			ans += '0'
	v = verify(ans)
	assert v[0] == N0, ans
	assert v[1] == N1, ans
	assert v[2] == N2, ans
	return ans

def main():
	T = read_int()
	for _ in range(T):
		(N0, N1, N2) = read_int_n()
		print(slv(N0, N1, N2))
main()


import sys

def input():
	return sys.stdin.readline().strip()

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 18
MOD = 10 ** 9 + 7
for _ in range(INT()):
	(a, b, c) = MAP()
	if b == 0 and c == 0:
		ans = '0' * (a + 1)
		print(ans)
		continue
	if a == 0 and b == 0:
		ans = '1' * (c + 1)
		print(ans)
		continue
	ans = '0' * (a + 1) + '1' * (c + 1)
	b -= 1
	i = 0
	while b:
		if i % 2 == 0:
			ans += '0'
		else:
			ans += '1'
		i += 1
		b -= 1
	print(ans)


import sys
try:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
	sys.stderr = open('stderr.txt', 'w')
except:
	pass
for _ in range(int(input())):
	(n0, n1, n2) = [int(x) for x in input().split()]
	ans = ''
	if n2 > 0:
		ans += '1'
	for _ in range(n2):
		ans += '1'
	p = int(0)
	if n2 == 0 and n1 > 0:
		ans += '1'
	for _ in range(int((n1 + 1) / 2) * 2 - 1):
		ans += str(p)
		p = 1 ^ p
	if n1 == 0 and n0 > 0:
		ans += '0'
	for _ in range(n0):
		ans += '0'
	if n1 % 2 == 0 and n1 > 0:
		ans += '1'
	print(ans)


for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	x = ''.join(['0'] * (a + 1))
	z = ''.join(['1'] * (c + 1))
	if b == 0:
		if a:
			print(x)
			continue
		if c:
			print(z)
			continue
	y = ''
	b -= 1
	while b > 1:
		y += '10'
		b -= 2
	t = x + y + z
	if b:
		t += '0'
	print(t)


from collections import Counter

class A:

	def solve(self):
		t = int(input())
		for i in range(t):
			n = list(map(int, input()))
			round_numbers = list(map(lambda x: x[0] * 10 ** x[1], filter(lambda x: x[0] > 0, zip(n, reversed(list(range(len(n))))))))
			print(len(round_numbers))
			print(' '.join(map(str, round_numbers)))

class B:

	def solve(self):
		t = int(input())
		for p in range(t):
			in_list = list(map(int, input().split(' ')))
			(n, k) = (in_list[0], in_list[1])
			if k % 2 == 1:
				if n % 2 == 0:
					first_term = n - (k - 1) * 2
					if first_term <= 0:
						print('NO')
						continue
					print('YES')
					print(' '.join([str(first_term)] + ['2' for x in range(k - 1)]))
				else:
					first_term = n - (k - 1)
					if first_term <= 0:
						print('NO')
						continue
					print('YES')
					print(' '.join([str(first_term)] + ['1' for x in range(k - 1)]))
			elif n % 2 == 0:
				first_term = n - (k - 1)
				if first_term <= 0:
					print('NO')
					continue
				if first_term % 2 == 1:
					print('YES')
					print(' '.join([str(first_term)] + ['1' for x in range(k - 1)]))
					continue
				first_term = n - (k - 1) * 2
				if first_term <= 0:
					print('NO')
					continue
				if first_term % 2 == 0:
					print('YES')
					print(' '.join([str(first_term)] + ['2' for x in range(k - 1)]))
				else:
					print('NO')
			else:
				print('NO')

class C:

	def solve(self):
		t = int(input())
		for p in range(t):
			in_list = list(map(int, input().split(' ')))
			(n, k) = (in_list[0], in_list[1])
			m = k // (n - 1)
			if k % (n - 1) == 0:
				print(m * n - 1)
				continue
			print(m * n + k % (n - 1))

class D:

	def solve(self):
		t = int(input())
		for p in range(t):
			n = int(input())
			candies = [int(x) for x in input().split(' ')]
			if len(candies) == 1:
				print('1 {} 0'.format(candies[0]))
				continue
			(b, a, n) = self.eat_candy(candies[1:], 1, 0, candies[0], 1, candies[0])
			print('{} {} {}'.format(n, a, b))

	def eat_candy(self, candies, turn, b_candy, a_candy, n_turns, previous_candy):
		if turn == 0:
			alice_sum = 0
			index = 0
			while index < len(candies) and alice_sum <= previous_candy:
				alice_sum += candies[index]
				index += 1
			if index == len(candies):
				return (b_candy, a_candy + alice_sum, n_turns + 1)
			else:
				return self.eat_candy(candies[index:], 1, b_candy, a_candy + alice_sum, n_turns + 1, alice_sum)
		else:
			bob_sum = 0
			index = len(candies) - 1
			while index >= 0 and bob_sum <= previous_candy:
				bob_sum += candies[index]
				index -= 1
			if index < 0:
				return (b_candy + bob_sum, a_candy, n_turns + 1)
			else:
				return self.eat_candy(candies[:index + 1], 0, b_candy + bob_sum, a_candy, n_turns + 1, bob_sum)

class E:

	def solve(self):
		t = int(input())
		for p in range(t):
			n = int(input())
			nums = [int(x) for x in input().split(' ')]
			counter = Counter(nums)
			cumulated = [nums[0]]
			for i in range(1, len(nums), 1):
				cumulated.append(cumulated[i - 1] + nums[i])
			num_elem = 0
			for j in range(1, len(cumulated), 1):
				count = counter[cumulated[j]]
				if count > 0:
					num_elem += counter[cumulated[j]]
					counter[cumulated[j]] = 0
			for i in range(len(cumulated)):
				for j in range(i + 2, len(cumulated), 1):
					cur_val = cumulated[j] - cumulated[i]
					count = counter[cur_val]
					if count > 0:
						num_elem += counter[cur_val]
						counter[cur_val] = 0
			print(num_elem)

class F:

	def solve(self):
		t = int(input())
		for p in range(t):
			(n0, n1, n2) = tuple(map(int, input().split(' ')))
			string = (['1'] if n2 > 0 else []) + ['1' for x in range(n2)]
			if len(string) == 0 and n1 > 0:
				string += ['1']
			string += (['0'] if n1 > 0 or n0 > 0 else []) + ['0' for x in range(n0)] + (['1'] if n1 > 1 else [])
			n1 -= 2
			string += ''.join(['01' for x in range(n1 // 2)])
			if n1 >= 0 and n1 % 2 == 1:
				string = ['0'] + string
			print(''.join(string))
F().solve()


def solve():
	(a, b, c) = input().strip().split()
	(a, b, c) = (int(a), int(b), int(c))
	if a == 0 and b == 0:
		return '1' * (c + 1)
	if b == 0 and c == 0:
		return '0' * (a + 1)
	ans = '0' * (a + 1)
	if b % 2 == 0:
		ans = '1' + ans
	else:
		b += 1
	while b > 1:
		if b % 2 == 0:
			ans += '1'
		else:
			ans += '0'
		b -= 1
	return ans + '1' * c
T = int(input())
for i in range(T):
	print(solve())


t = int(input())
for i in range(t):
	(a, b, c) = map(int, input().split())
	k = ['1']
	if a == 0:
		p = []
	else:
		p = ['0'] * (a + 1)
	if c == 0:
		y = []
	else:
		y = ['1'] * c
	if b % 2 != 0:
		r = ['01'] * ((b - 1) // 2)
		k += r
	else:
		r = ['01'] * (b // 2)
		k += r
		k.pop()
		k.append('0')
	if p == []:
		if k[-1] == '01' or k[-1] == '1':
			k.append('0')
		elif k[-1] == '0':
			k.append('1')
	if b == 0 and c == 0:
		k = []
	elif a == 0 and b == 0:
		k = ['1']
	g = p + y + k
	print(''.join(g))


def main():
	caseNum = int(input())
	for _ in range(caseNum):
		(n0, n1, n2) = list(map(int, input().split(' ')))
		if n1 + n2 > 0:
			finalStr = '1'
			for _ in range(n2):
				finalStr += '1'
			if n1 > 0:
				n1 -= 1
				finalStr += '0'
				for _ in range(n0):
					finalStr += '0'
			for _ in range(n1):
				if finalStr[-1] == '1':
					finalStr += '0'
				else:
					finalStr += '1'
		else:
			finalStr = '0'
			for _ in range(n0):
				finalStr += '0'
		print(finalStr)
main()


t = int(input())
for i in range(t):
	(a1, b1, c1) = input().split(' ')
	a = int(a1)
	b = int(b1)
	c = int(c1)
	arr = []
	for i in range(c):
		arr = arr + [1]
	for i in range(0, b, 2):
		arr = arr + [1] + [0]
	for i in range(a):
		arr = arr + [0]
	if b % 2 == 0 and b != 0:
		arr = arr + [1]
	if b == 0 and a == 0:
		arr = arr + [1]
	if b == 0 and c == 0:
		arr = arr + [0]
	for i in range(len(arr)):
		print(arr[i], end='')
	print()


from math import *
t = int(input())
while t > 0:
	ip = [int(x) for x in input().split()]
	n0 = ip[0]
	n1 = ip[1]
	n2 = ip[2]
	ans = ''
	if n0 > 0:
		for i in range(n0 + 1):
			ans += '0'
	elif n1 > 0:
		ans += '0'
	if n1 > 0:
		ans += '1'
		n1 -= 1
		for i in range(n1 // 2):
			ans += '01'
		n1 = n1 - 2 * (n1 // 2)
	elif n2 > 0:
		ans += '1'
	if n2 > 0:
		for i in range(n2):
			ans += '1'
	if n1 > 0:
		ans += '0'
	print(ans)
	t -= 1


t = int(input())
for tt in range(0, t):
	(n0, n1, n2) = map(int, input().split())
	l = []
	if n1 == 0 and n0 > 1:
		while n0 + 1 > 0:
			l.append('0')
			n0 -= 1
		for k in l:
			print(k, end='')
		print('')
	elif n1 == 0 and n2 > 0:
		while n2 + 1 > 0:
			l.append('1')
			n2 -= 1
		for k in l:
			print(k, end='')
		print('')
	else:
		i = 0
		while n1 + 1 > 0:
			if i % 2 == 1:
				l.append('1')
			else:
				l.append('0')
			i += 1
			n1 -= 1
		z = []
		while n0 > 0:
			z.append('0')
			n0 -= 1
		o = []
		while n2 > 0:
			o.append('1')
			n2 -= 1
		flag = 0
		f = 0
		for k in l:
			if k == '0' and flag == 0:
				for p in z:
					print(p, end='')
				flag = 1
				print(k, end='')
			elif k == '1' and f == 0:
				for p in o:
					print(p, end='')
				f = 1
				print(k, end='')
			else:
				print(k, end='')
		print('')


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
mod2 = 998244353
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def IF(c, t, f):
	return t if c else f

def YES(c):
	return IF(c, 'YES', 'NO')

def Yes(c):
	return IF(c, 'Yes', 'No')

def main():
	t = I()
	rr = []
	for _ in range(t):
		(a, b, c) = LI()
		if b == 0:
			if a > 0:
				r = [0] * (a + 1)
			else:
				r = [1] * (c + 1)
		else:
			r = [0]
			for _ in range(b):
				r.append(r[-1] ^ 1)
			r[0] = str(r[0]) * (a + 1)
			r[1] = str(r[1]) * (c + 1)
		rr.append(JA(r, ''))
	return JA(rr, '\n')
print(main())


import sys
input = lambda : sys.stdin.readline().strip()
t = int(input())
while t:
	t -= 1
	(n0, n1, n2) = map(int, input().split())
	ans = ''
	if n1 == 0:
		if n0:
			for i in range(n0):
				print(0, end='')
			print(0)
		else:
			for i in range(n2):
				print(1, end='')
			print(1)
	else:
		for i in range(n0):
			print(0, end='')
		print('01', end='')
		n1 -= 1
		for i in range(n2):
			print(1, end='')
		d = 0
		while n1:
			print(d, end='')
			d ^= 1
			n1 -= 1
		print()


import math
from collections import Counter, deque
L = lambda : list(map(int, input().split()))
M = lambda : map(int, input().split())
I = lambda : int(input())
IN = lambda : input()
mod = 10 ** 9 + 7

def s(a):
	print(' '.join(list(map(str, a))))
for i in range(I()):
	(a, b, c) = M()
	if b == 0:
		if a == 0:
			print('1' * (c + 1))
		elif c == 0:
			print('0' * (a + 1))
	else:
		s = '1' * (c + 1) + '0' * (a + 1)
		t = '10' * b
		print(s + t[:b - 1])


from sys import stdin
input = lambda : stdin.readline().strip()
from math import ceil, sqrt, factorial, gcd
for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	s = ''
	if n1 == 0:
		if n0 != 0:
			s = '0' * (n0 + 1)
		else:
			s = '1' * (n2 + 1)
	else:
		for i in range(n1 + 1):
			if i % 2 == 0:
				s += '1'
			else:
				s += '0'
		s = '1' + '0' * n0 + s[1:]
		s = '1' * n2 + s
	print(s)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from collections import Counter
for i in range(int(input())):
	(n, m, k) = map(int, input().split())
	ans = ''
	if m == 0:
		if n > 0:
			print('0' * (n + 1))
		elif k > 0:
			print('1' * (k + 1))
	else:
		if k > 0:
			ans += '1' * (k + 1)
			var = m
			if n > 0:
				ans = '0' * (n + 1) + ans
				var = m - 1
			if var % 2 == 0:
				ans += '01' * (var // 2)
			else:
				ans += '01' * (var // 2)
				ans += '0'
		else:
			if n > 0:
				ans += '0' * (n + 1)
			else:
				ans += '0'
			if m % 2 == 0:
				ans += '10' * (m // 2)
			else:
				ans += '10' * (m // 2)
				ans += '1'
		print(ans)


for testcase in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	if n1 == 0:
		if n0 > 0:
			print('0' * (n0 + 1))
		else:
			print('1' * (n2 + 1))
		continue
	print('1' * (n2 + 1), end='')
	print('0' * n0, end='')
	for i in range(n1):
		if i % 2 == 0:
			print('0', end='')
		else:
			print('1', end='')
	print()


for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	if n1 == 0:
		if n0 > 0:
			print('0' * (n0 + 1))
		else:
			print('1' * (n2 + 1))
	else:
		l = '1'
		r = ''
		for i in range(n1):
			if i & 1:
				r += '1'
			else:
				r += '0'
		z = '0' * n0
		o = '1' * n2
		print(o + l + z + r)


t = int(input())
for _ in range(t):
	(a, b, c) = map(int, input().split())
	a += 1
	ans = ''
	s = 0
	while a:
		if a == 1 and (not s):
			break
		s = 1
		ans += '0'
		a -= 1
	if c and len(ans):
		b -= 1
	c += 1
	s = 0
	while c:
		if c == 1 and (not s):
			break
		s = 1
		ans += '1'
		c -= 1
	if not len(ans):
		b += 1
	while b:
		if len(ans):
			ans += str(int(ans[-1]) ^ 1)
		else:
			ans += '1'
		b -= 1
	print(ans)


for _ in range(int(input())):
	(n0, n1, n2) = map(int, input().split())
	m = 0
	if n1 == 0:
		s = ''
	elif n1 == 1:
		s = '01'
	else:
		s = '01'
		if n1 % 2 == 0:
			m = 1
			n1 = n1 - 2
			for i in range(0, n1):
				if i % 2 == 0:
					s = s + '0'
				else:
					s = s + '1'
		else:
			n1 = n1 - 1
			for i in range(0, n1):
				if i % 2 == 0:
					s = s + '0'
				else:
					s = s + '1'
	if s == '':
		if n0 > 0:
			s = s + '0' * (n0 + 1)
		if n2 > 0:
			s = s + '1' * (n2 + 1)
	elif m == 1:
		s = '0' * n0 + s + '1' * n2 + '0'
	else:
		s = '0' * n0 + s + '1' * n2
	print(s)


t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	l = x + y + z + 1
	if x == 0 and y == 0:
		print((z + 1) * '1')
	elif y == 0 and z == 0:
		print('0' * (x + 1))
	else:
		a = ''
		a += '0' * (x + 1)
		a += '1' * (z + 1)
		k = 1
		flag = True
		while k < y:
			if flag:
				a += '0'
				flag = False
			else:
				a += '1'
				flag = True
			k += 1
		print(a)


q = int(input())
for loop in range(q):
	(z, o, t) = map(int, input().split())
	if o == 0 and z > 0:
		ans = [0] * (z + 1)
	elif o == 0 and t > 0:
		ans = [1] * (t + 1)
	else:
		ans = [0] * (z + 1) + [1] * (t + 1)
		o -= 1
		while o > 0:
			ans.append(ans[-1] ^ 1)
			o -= 1
	print(''.join(map(str, ans)))


t = int(input())
for i in range(t):
	(a, b, c) = list(map(int, input().split()))
	queue = [('', a, b, c)]
	while queue:
		(s, a, b, c) = queue.pop(-1)
		if a + b + c == 0:
			print(s)
			break
		if c > 0:
			if not s:
				queue.append(('11', a, b, c - 1))
			elif s[-1] == '1':
				queue.append((s + '1', a, b, c - 1))
		if b > 0:
			if not s:
				queue.append(('01', a, b - 1, c))
				queue.append(('10', a, b - 1, c))
			else:
				queue.append((s + str(1 - int(s[-1])), a, b - 1, c))
		if a > 0:
			if not s:
				queue.append(('00', a - 1, b, c))
			elif s[-1] == '0':
				queue.append((s + '0', a - 1, b, c))


from sys import stdin

def inp():
	return stdin.buffer.readline().rstrip().decode('utf8')

def itg():
	return int(stdin.buffer.readline())

def mpint():
	return map(int, stdin.buffer.readline().split())
for case in range(itg()):
	(zero, one, two) = mpint()
	if not zero and (not two):
		if one == 1:
			ans = '01'
		elif one & 1:
			ans = '01' * (one >> 1) + '01'
		else:
			ans = '01' * (one >> 1) + '0'
		print(ans)
		continue
	if zero and one and (not two):
		ans = '0' * (zero + 1)
		if one & 1:
			ans += '10' * (one >> 1) + '1'
		else:
			ans += '10' * (one >> 1)
		print(ans)
		continue
	if not zero and one and two:
		ans = '1' * (two + 1)
		if one & 1:
			ans += '01' * (one >> 1) + '0'
		else:
			ans += '01' * (one >> 1)
		print(ans)
		continue
	ans = ''
	if zero:
		ans += '0' * (zero + 1)
	if two:
		ans += '1' * (two + 1)
	if one:
		one -= 1
	ans += '01' * (one >> 1)
	if one & 1:
		ans += '0'
	print(ans)


for _ in range(int(input())):
	(n0, n1, n2) = list(map(int, input().split()))
	b = ''
	n = n0 + 1 if n0 > 0 else 0
	b += '0' * n
	n = n2 + 1 if n2 > 0 else 0
	b += '1' * n
	if n2 != 0 and n0 != 0:
		n1 -= 1
	elif n2 == 0 and n0 == 0:
		b += '0'
	while n1 > 0:
		b += str(1 - int(b[-1]))
		n1 -= 1
	print(b)
	test = {0: 0, 1: 0, 2: 0}
	for i in range(1, len(b)):
		sub = b[i - 1:i + 1]
		nones = sub.count('1')
		test[nones] += 1


def solve(n0, n1, n2):
	if n0 == n1 == 0:
		return '1' * (n2 + 1)
	if n1 == n2 == 0:
		return '0' * (n0 + 1)
	if n0 == n2 == 0:
		(sol, n) = ([], 0)
		for _ in range(n1 + 1):
			sol.append(n)
			n = 1 - n
		return ''.join(map(str, sol))
	if n0 != 0 and n1 != 0 and (n2 == 0):
		p0 = '0' * (n0 + 1)
		(sol, n) = ([], 1)
		for _ in range(n1):
			sol.append(n)
			n = 1 - n
		return p0 + ''.join(map(str, sol))
	if n1 != 0 and n2 != 0 and (n0 == 0):
		p2 = '1' * (n2 + 1)
		(sol, n) = ([], 0)
		for _ in range(n1):
			sol.append(n)
			n = 1 - n
		return p2 + ''.join(map(str, sol))
	p0 = '0' * (n0 + 1)
	p2 = '1' * (n2 + 1)
	(p1, n) = ([], 1)
	for _ in range(n1 - 1):
		p1.append(n)
		n = 1 - n
	p1 = ''.join(map(str, p1))
	if not p1 or p1[-1] == '0':
		return p0 + p1 + p2
	(p1, n) = ([], 0)
	for _ in range(n1 - 1):
		p1.append(n)
		n = 1 - n
	p1 = ''.join(map(str, p1))
	return p0 + p2 + p1

def _count(s):
	d = {'00': 0, '01': 0, '10': 0, '11': 0}
	for i in range(len(s) - 1):
		d[s[i:i + 2]] += 1
	return (d['00'], d['01'] + d['10'], d['11'])
t = int(input())
for _ in range(t):
	(n0, n1, n2) = map(int, input().split())
	sol = solve(n0, n1, n2)
	print(sol)


import bisect
import os
from collections import Counter
import bisect
from collections import defaultdict
import math
import random
import heapq as hq
from math import sqrt
import sys
from functools import reduce, cmp_to_key
from collections import deque
import threading
from itertools import combinations
from io import BytesIO, IOBase
from itertools import accumulate

def lcm(a, b):
	return a * b // math.gcd(a, b)

def sort_dict(key_value):
	return sorted(key_value.items(), key=lambda kv: (kv[1], kv[0]))

def list_input():
	return list(map(int, input().split()))

def num_input():
	return map(int, input().split())

def string_list():
	return list(input())

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def binaryToDecimal(n):
	return int(n, 2)

def solve():
	(n0, n1, n2) = num_input()
	ans = ''
	if n2 != 0:
		for i in range(n2 + 1):
			ans += '1'
	if n0 != 0:
		for i in range(n0 + 1):
			ans += '0'
	if n1 == 0:
		print(ans)
	elif n0 != 0:
		if n2 != 0:
			n1 -= 1
		for i in range(n1):
			if i % 2 == 0:
				ans += '1'
			else:
				ans += '0'
		print(ans)
	elif n0 == n2 and n0 == 0:
		n1 += 1
		for i in range(n1):
			if i % 2 == 0:
				ans += '0'
			else:
				ans += '1'
		print(ans)
	else:
		for i in range(n1):
			if i % 2 == 0:
				ans += '0'
			else:
				ans += '1'
		print(ans)
t = int(input())
for _ in range(t):
	solve()


import io, os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
import sys

def solve(n0, n1, n2):
	ans = ''
	if n1 == 0:
		if n0:
			return '0' * (n0 + 1)
		return '1' * (n2 + 1)
	for i in range(n1 + 1):
		if i == 0:
			ans += '1' * (n2 + 1)
		elif i == 1:
			ans += '0' * (n0 + 1)
		elif i % 2 == 0:
			ans += '1'
		else:
			ans += '0'
	return ans

def main():
	t = int(input())
	for _ in range(t):
		(n0, n1, n2) = map(int, input().split())
		ans = solve(n0, n1, n2)
		sys.stdout.write(ans + '\n')
main()


def solve():
	(n0, n1, n2) = map(int, input().split())
	a = []
	if n1 == 0:
		if n2 != 0:
			print('1' * (n2 + 1))
		else:
			print('0' * (n0 + 1))
		return
	if n1 == 1:
		print('1' * (n2 + 1), end='')
		print('0' * (n0 + 1))
		return
	f = True
	for _ in range(n1):
		if f:
			print(1, end='')
		else:
			print(0, end='')
		f ^= True
	st = 1
	(p, q) = (n2, n0)
	if n1 % 2 == 0:
		st = 0
		p = n0
		q = n2
	for _ in range(p):
		print(st, end='')
	st = (st + 1) % 2
	for _ in range(q + 1):
		print(st, end='')
	print()
t = int(input())
for _ in range(t):
	solve()


import itertools as it
t = int(input())
for i in range(t):
	(n0, n1, n2) = map(int, input().split())
	if n1 == 0:
		if n0:
			print('0' * (n0 + 1))
		else:
			print('1' * (n2 + 1))
		continue
	first = '0' * (n0 + 1)
	second = '1' * (n2 + 1)
	third = ''.join(it.islice(it.cycle('01'), 0, n1 - 1))
	print(first + second + third)


t = int(input())
for i in range(t):
	(a, b, c) = map(int, input().split())
	(q1, q2, q3) = ('', '', '')
	q1 = '1' * (c + (b != 0 or c > 0))
	for i in range(b - (b % 2 == 0)):
		q2 += str(i % 2)
	q3 = '0' * a
	q3 += '1' * (b % 2 == 0 and b > 0)
	q3 += '0' * (b + c == 0)
	print(q1, q2, q3, sep='')


t = int(input())
for i in range(t):
	(n0, n1, n2) = (int(x) for x in input().split())
	if n1 % 2 == 1:
		base = ['01'] * ((n1 + 1) // 2)
		bases = ''.join(base)
		print(bases.rjust(len(bases) + n0, '0').ljust(len(bases) + n0 + n2, '1'))
	elif n1 == 0:
		if n0 > 0:
			print(''.join(['0'] * (n0 + 1)))
		else:
			print(''.join(['1'] * (n2 + 1)))
	else:
		base = ['10'] * (n1 // 2)
		bases = ''.join(base)
		print('0' + bases.rjust(len(bases) + n2, '1').ljust(len(bases) + n0 + n2, '0'))


import sys
T = int(sys.stdin.readline())
for _ in range(T):
	(n1, n2, n3) = map(int, sys.stdin.readline().split())
	sum_count = n1 + n2 + n3
	if n1 or n2:
		result = '0'
	else:
		result = '1'
	last = result[0]
	while sum_count:
		if last == '0':
			if n1:
				n1 -= 1
				result += '0'
			elif n2:
				n2 -= 1
				result += '1'
		elif n3:
			n3 -= 1
			result += '1'
		elif n2:
			n2 -= 1
			result += '0'
		last = result[-1]
		sum_count -= 1
	print(result)


def solve():
	(n1, n2, n3) = map(int, input().split())
	if n2 != 0:
		rep = (n2 + 1) // 2
		print('1' * n3 + '10' * rep + '0' * n1 + '1' * (1 - n2 % 2))
	elif n1 != 0:
		print('0' * (n1 + 1))
	else:
		print('1' * (n3 + 1))
T = int(input())
for _ in range(T):
	solve()


num = int(input())
while num > 0:
	num = num - 1
	(z, o, t) = map(int, input().split())
	ans = str()
	if z != 0:
		ans = ans + str(0)
		for i in range(0, z):
			ans = ans + str(0)
	if o != 0:
		if z == 0:
			if o % 2 != 0:
				tp = o + 1
				for i in range(0, tp // 2):
					ans = ans + str(0) + str(1)
			else:
				ans = ans + str(1)
				for i in range(0, o // 2):
					ans = ans + str(0) + str(1)
		elif o % 2 != 0:
			ans = ans + str(1)
			if o > 2:
				tp = o - 1
				for i in range(0, tp // 2):
					ans = ans + str(0) + str(1)
		else:
			ans = str(1) + ans + str(1)
			if o > 3:
				for i in range(1, o // 2):
					ans = ans + str(0) + str(1)
	if t != 0:
		if o == 0:
			ans = ans + str(1)
		for i in range(0, t):
			ans = ans + str(1)
	print(ans)