import random
import sys

sys.set_int_max_str_digits(1000000)

random.seed(str(sys.argv))

len_ab = int(sys.argv[1])
len_c = int(sys.argv[2])
non_zeros = int(sys.argv[3])

len_a = (len_ab + len_c) // 2
len_b = len_ab - len_a

while True:
	if non_zeros == -1:
		b = random.randint(10 ** (len_b - 1), 10 ** len_b - 1)
		c = random.randint(10 ** (len_c - 1), 10 ** len_c - 1)
	else:
		b = 10 ** (len_b - 1) * random.randint(1, 9)
		c = 10 ** (len_c - 1) * random.randint(1, 9)
		d = {}
		for i in range(non_zeros):
			pos = random.randint(0, len_b - 2)
			if pos not in d:
				d[pos] = 1
				b += 10 ** pos * random.randint(1, 9)
		d = {}
		for i in range(non_zeros):
			pos = random.randint(0, len_c - 2)
			if pos not in d:
				d[pos] = 1
				c += 10 ** pos * random.randint(1, 9)

	a = b * c

	if len(str(a)) == len_a:
		break

print(f"{a}{b} {c}")