Olesya loves numbers consisting of n digits, and Rodion only likes numbers that are divisible by t. Find some number that satisfies both of them.

Your task is: given the n and t print an integer strictly larger than zero consisting of n digits that is divisible by t. If such number doesn't exist, print  - 1.

Input

The single line contains two numbers, n and t (1 ≤ n ≤ 100, 2 ≤ t ≤ 10) — the length of the number and the number it should be divisible by.

Output

Print one such positive number without leading zeroes, — the answer to the problem, or  - 1, if such number doesn't exist. If there are multiple possible answers, you are allowed to print any of them.

Examples

Input

3 2


Output

712

Difficulty: EASY
Tags: Mathematics

Starter code:

Solutions:
(n, t) = input().split(' ')
n = int(n)
t = int(t)
a = 10 ** (n - 1)
b = 10 ** n
for i in range(a, b):
	if i == b - 1:
		if i % t == 0:
			print(i)
			break
		else:
			print(-1)
			break
	elif i % t == 0:
		print(i)
		break
	i = i + 1


(n, t) = map(int, input().split())
l = '1'
for i in range(n - 1):
	l = l + '0'
l = int(l)
if n == 1 and t == 10:
	print(-1)
	exit()
for i in range(t + 1):
	if l % t == 0:
		print(l)
		break
	else:
		l = l + 1


def olesya():
	x = list(map(int, input().split()))
	j = 10 ** (x[0] - 1)
	while j % x[1] != 0:
		j += 1
		if len(str(j)) > x[0]:
			return -1
	return j
print(olesya())


import sys
f = sys.stdin
(ns, ts) = f.readline().strip().split()
n = int(ns)
t = int(ts)
if n == 1 and t == 10:
	print(-1)
else:
	d = n - len(ts)
	print(t * 10 ** d)


(n, m) = map(int, input().split())
if m != 10:
	print(n * str(m))
elif m == 10 and n != 1:
	if n % 2 == 0:
		print(n // 2 * str(m))
	else:
		print(n // 2 * str(m) + '0')
else:
	print(-1)


(n, t) = map(int, input().split())
if t == 10:
	if n > 1:
		s = '1' * (n - 1) + '0'
		print(s)
	else:
		print(-1)
else:
	print(str(t) * n)


(n, t) = map(int, input().split())
count = 0
for i in range(10 ** (n - 1), 10 ** n):
	if i % t == 0:
		print(i)
		count = count + 1
		break
if count < 1:
	print(-1)


l = list(map(int, input().strip().split()))
n = l[0]
t = l[1]
a = int(str(1) + '0' * (n - 1))
b = int('9' * n)
flag = 0
for i in range(a, b + 1):
	if i % t == 0:
		print(i)
		flag = 1
		break
if flag == 0:
	print(-1)


(a, b) = input().split()
a = int(a)
b = int(b)
flag = 0
for i in range(10 ** (a - 1), 10 ** a):
	if i % b == 0:
		print(i)
		flag = 1
		break
if flag == 0:
	print(-1)


(n, m) = list(map(int, input().split()))
(k, l, t) = (10 ** (n - 1), 10 ** n, 0)
for i in range(k, l):
	if i % m == 0:
		print(i)
		t = t + 1
		break
if t == 0:
	print('-1')


(a, b) = input().split()
a = int(a, 10)
b = int(b, 10)
l = 0
for i in range(pow(10, a - 1), pow(10, a)):
	if i % b == 0:
		print(i)
		l = 1
		break
if l < 1:
	print('-1')


(n, t) = map(int, input().split())
l = list(map(int, str(t)))
if n < len(l):
	print('-1')
elif t == 10:
	print('1' * (n - 1) + '0')
else:
	b = n
	for i in range(b):
		print(t, end='')


(a, b) = map(int, input().split())
S = 0
for i in range(10 ** (a - 1), 10 ** a):
	if i % b == 0:
		S = 1
		print(i)
		break
if S == 0:
	print(-1)


(n, t) = [int(i) for i in input().split()]
lst = []
if t < 10:
	for i in range(n):
		lst.append(str(t))
	s = ''.join(lst)
	print(int(s))
else:
	lst = []
	s = str(t)
	lst1 = list(s)
	n_digi = len(lst1)
	for i in range(n_digi):
		lst.append(lst1[i])
	n_rem = n - n_digi
	if n_digi > n:
		print(-1)
	else:
		for i in range(n_rem):
			lst.append('0')
		print(''.join(lst))


(n, t) = map(int, input().split())
bool = False
for k in range(10 ** (n - 1), 10 ** n):
	if k % t == 0:
		print(k)
		bool = True
		break
if not bool:
	print(-1)


(length, dev) = map(int, input().split())
print(dev * 10 ** (length - 1) - dev if length != 1 else dev if dev != 10 else -1)


(n, t) = map(int, input().split())
if n == 1 and t > 9:
	print('-1')
elif t == 10:
	print(int(str(1) * n) - 1)
else:
	print(n * str(t))


(n, t) = input().split()
(n, t) = (int(n), int(t))
a = 10 ** (n - 1)
while a % t != 0:
	a += 1
if n == 1 and t == 10:
	a = -1
print(a)


(n, t) = [int(i) for i in input().split()]
if t < 10:
	print(str(t) * n)
elif t == 10 and n > 1:
	print(10 ** (n - 1))
else:
	print(-1)


(n, t) = map(int, input().split())
if t == 10:
	if n == 1:
		print(-1)
	else:
		print(t * pow(10, n - 2))
else:
	print(t * pow(10, n - 1))


(n, t) = map(int, input().split())
found = False
for i in range(10 ** (n - 1), 10 ** n):
	if i % t == 0:
		print(i)
		found = True
		break
if not found:
	print(-1)


(n, t) = map(int, input().split())
c = int('1' * n)
if int('9' * n) < t:
	print('-1')
	exit()
while c % t != 0:
	c += 1
print(c)


(n, t) = [int(x) for x in input().split()]
if n == 1 and t == 10:
	print(-1)
elif t == 10:
	print(str(t) + '0' * (n - 2))
else:
	print(str(t) + '0' * (n - 1))


(n, t) = map(int, input().split())
res = 10 ** (n - 1)
m = res % t
res += t - m
if n == 1 and t == 10:
	print(-1)
else:
	print(res)


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

def main():
	(n, t) = INPUT()
	if n == 1 and t == 10:
		print('-1')
	else:
		N = 10 ** (n - 1)
		Num = N + t - N % t
		print(Num)
main()


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


def power(a, b):
	if b == 0:
		return 1
	elif b % 2 == 0:
		a_1 = a * a
		return pow(a_1, b // 2)
	return a * pow(a, b - 1)

def ol_rd(n, t):
	z = power(10, n - 1)
	while z % t != 0 and z + 1 < power(10, n):
		z += 1
	if z % t == 0:
		return z
	return -1
(N, T) = [int(i) for i in input().split()]
print(ol_rd(N, T))


def OlandRo(n, t):
	if n == 1:
		l = 1
		h = 10
	else:
		l = 10 ** (n - 1)
		h = 10 ** n
	for i in range(l, h):
		if i % t == 0:
			return i
	return -1
(n, t) = map(int, input().split())
print(OlandRo(n, t))


(n, t) = list(map(int, input().split()))
number = 10 ** (n - 1)
ans = (number // t + 1) * t
if len(str(ans)) == n:
	print(ans)
else:
	print(-1)


(a, b) = map(int, input().split())
num = int('1' + '0' * (a - 1))
if a == 1 and b == 10:
	print(-1)
else:
	print(num + b - num % b)


res = False
(n, t) = map(int, input().split())
start = 10 ** (n - 1)
end = 10 ** n - 1
for i in range(start, end + 1):
	if i % t is 0:
		res = True
		print(i)
		break
if not res:
	print(-1)


(n, t) = input().split()
n = int(n)
if t != '10':
	print(int(t * n))
elif n != 1:
	print(int(t) ** (n - 1))
else:
	print(-1)


tmp = list(map(int, input().split()))
n = 10 ** (tmp[0] - 1)
to_p = -1
for i in range(n, n * 10):
	if i % tmp[1] == 0:
		to_p = i
		break
print(to_p)


(n, k) = map(int, input().split())
i = 10 ** (n - 1)
while i < 10 ** n:
	if i % k == 0:
		print(i)
		break
	i += 1
if i == 10 ** n:
	print('-1')


(n, t) = map(int, input().split())
if n == 1 and t == 10:
	print('-1')
elif t == 10:
	print(t, end='')
	for i in range(n - 2):
		print('0', end='')
else:
	print(t, end='')
	for i in range(n - 1):
		print('0', end='')


(n, t) = map(int, input().split())
s = 10 ** (n - 1)
p = s
k = 0
while p // (s * 10) == 0:
	if p % t == 0:
		print(p)
		break
	else:
		p = p + 1
		k = k + 1
if k == s * 10 - 1:
	print('-1')


(n, t) = [int(x) for x in input().split()]
if t == 10:
	if n == 1:
		print(-1)
	else:
		print((n - 1) * '1' + '0')
else:
	print(str(t) * n)


import math

def digitcount(x):
	s = 0
	while x:
		x = int(x / 10)
		s += 1
	return s
(x, y) = input().split()
r = int(x)
s = int(y)
c = digitcount(s)
if c > r:
	print('-1')
else:
	d = r - c
	print(str(s) + '0' * d)


(n, t) = map(int, input().split())
if len(str(t)) > n:
	print(-1)
else:
	q = 10 ** (n - 1)
	print(q + t - q % t)


(n, t) = input().split()
if int(n) < len(t):
	print(-1)
else:
	print(f'{t}', end='')
	print('0' * (int(n) - len(t)))


from sys import stdin
(n, m) = map(int, stdin.readline().strip().split())
if m != 10:
	x = m * pow(10, n - 1)
else:
	x = m * pow(10, n - 2)
if x % m != 0:
	print(-1)
else:
	print(x)


(n, t) = map(int, input().split())
s = 10 ** (n - 1)
if t == 10:
	if n == 1:
		print(-1)
	else:
		print(s)
else:
	num = 0
	for i in range(n):
		num += 10 ** i
	print(num * t)


(n, t) = map(int, input().split())
ni = 10 ** (n - 1)
r = ni - ni % t + t
if r < 10 ** n:
	print(r)
else:
	print(-1)


import math
f = input()
t = f.split()
a = int(str(t[0]))
m = int(str(t[1]))
i = 10 ** (a - 1)
b = i * 10
s = -1
while i < b:
	if i % m == 0:
		s = i
		break
	i = i + 1
print(s)


(n, t) = list(map(int, input().split()))
m = 10 ** n - 1
a = m % t
if n == 1 and t == 10:
	print(-1)
else:
	print(m - a)


(n, t) = (int(x) for x in input().split())
if n == 1 and t == 10:
	print(-1)
elif t == 10:
	print(10 ** (n - 1))
else:
	print(t * 10 ** (n - 1))


def main():
	(n, m) = map(int, input().split())
	ans = 10 ** (n - 1)
	if m != 10:
		print(ans * m)
	elif n != 1:
		print(ans)
	else:
		print(-1)
main()


(n, t) = map(int, input().split())
if t == 10:
	if n == 1:
		print(-1)
	else:
		[print(1, end='') for _ in range(n - 1)]
		print(0)
else:
	[print(t, end='') for _ in range(n)]


def Olesya_and_Rodion(n, t):
	if t < 10:
		num = int(str(t) * n)
		return num
	elif n == 1:
		return -1
	else:
		num = int(str(1) * (n - 1) + '0')
		return num
	return -1
(n, t) = map(int, input().split())
print(Olesya_and_Rodion(n, t))


(n, t) = list(map(int, input().split()))
x = 0
if t < 10:
	for i in range(n):
		x = x + t * 10 ** i
if t == 10:
	for i in range(1, n):
		x = x + 10 ** i
if x <= 0:
	print(-1)
else:
	print(x)


(n, t) = map(int, input().split())
x = 10 ** (n - 1)
yes = 0
while len(str(x)) == n:
	if x % t == 0:
		yes = 1
		break
	else:
		x += 1
if yes == 1:
	print(x)
else:
	print(-1)


[n, t] = [int(x) for x in input().split()]
start = 10 ^ n - 1
factorList = []
i = 2
num = t
while num != 1:
	if num % i == 0:
		factorList.append(i)
		while num % i == 0:
			num /= i
	i += 1
a = 1
for factor in factorList:
	a *= factor
while len(str(a)) < n:
	a *= factorList[0]
if len(str(a)) == n:
	while len(str(a)) == n and a % t != 0:
		a *= factorList[0]
	print(a)
else:
	print(-1)


def encuentra_num(x, y):
	a = 10 ** (x - 1)
	b = y * a
	if a % y == 0:
		return a
	if b < 10 ** x:
		return b
	return -1
n = input().split()
print(encuentra_num(int(n[0]), int(n[1])))


a = input()
(n, t) = list(map(int, a.split()))
k = 0
for i in range(pow(10, n - 1), pow(10, n)):
	if i % t == 0:
		print(i)
		k = 1
		break
if k == 0:
	print('-1')


s = input()
a = s.split()
for i in range(len(a)):
	a[i] = int(a[i])
n = 1
for i in range(a[0] - 1):
	n *= 10
while len(str(n)) == a[0]:
	if n % a[1] == 0:
		print(n)
		break
	else:
		n += 1
	if len(str(n)) == a[0] + 1:
		print(-1)


lis1 = input().split()
n = int(lis1[0])
t = int(lis1[1])

def sel(n, t):
	for i in range(10 ** (n - 1), 10 ** n):
		if i % t == 0:
			return i
	return -1
print(sel(n, t))


(n, t) = map(int, input().split())
f = 1
if n == 1 and t == 10:
	print(-1)
elif t == 10:
	print(10 ** (n - 1))
else:
	print(t * 10 ** (n - 1))


inp = list(map(int, input().split()))
n = inp[0]
t = inp[1]
ans = 0
gh = 1
dig = 10 ** (n - 1)
for i in range(dig, 10 ** n):
	if i % t == 0:
		ans = 1
		gh = i
		break
if ans == 1:
	print(gh)
else:
	print(-1)


(n, t) = map(int, input().split())
test = pow(10, n - 1)
while True:
	if test % pow(10, n) == 0:
		print(-1)
		break
	if test % t == 0:
		print(test)
		break
	test += 1


(n, t) = map(int, input().split())
num = 10 ** (n - 1)
a = 10 ** n
while True and num < a:
	if num % t == 0:
		print(num)
		exit()
	num += 1
print(-1)


(m, t) = map(int, input().split())
if m == 1 and t == 10:
	print(-1)
else:
	n = 10 ** (m - 1)
	while 1 == 1:
		if n % t == 0:
			print(n)
			break
		n += 1


(n, t) = map(int, input().split())
if t == 10 and n == 1:
	print(-1)
	exit()
elif t == 10 and n != 1:
	print(10 ** (n - 1))
	exit()
print(t * 10 ** (n - 1))


nt = input().split(' ')
n = int(nt[0])
t = int(nt[1])
start = '1'
end = '9'
for i in range(n - 1):
	start += '0'
	end += '9'
for i in range(int(start), int(end) + 1):
	if i > 0 and i % t == 0:
		print(i)
		break
if i >= int(end) and i % t != 0:
	print('-1')


(n, t) = map(int, input().split())
x = 10 ** (n - 1)
if n == 1:
	if t == 10:
		print(-1)
	else:
		print(t)
elif t == 3 or t == 6 or t == 9:
	print(x + 8)
elif t == 1 or t == 2 or t == 5 or (t == 10):
	print(x)
elif t == 4:
	if n == 2:
		print(12)
	else:
		print(x)
elif t == 8:
	if n == 2:
		print(16)
	elif n == 3:
		print(104)
	else:
		print(x)
else:
	for i in range(x, 10 ** n):
		if i % t == 0:
			print(i)
			break


args = [int(x) for x in input().split(' ')]
n = args[0]
t = args[1]
if t < 10:
	print(10 ** (n - 1) * t)
elif n == 1:
	print('-1')
else:
	print(10 ** (n - 1))


(n, t) = map(int, input().split(' '))
s = '1' + '0' * (n - 1)
res = int(s)
r = res % t
if r != 0:
	res = res + t - r
print(res) if len(str(res)) == n else print(-1)


(n, m) = [int(k) for k in input().split()]
x = 1
for i in range(1, n, 1):
	x = x * 10
while True:
	if n is 1 and m is 10:
		print('-1')
		break
	elif x % m == 0:
		print(x)
		break
	else:
		x = x + 1


import sys
from random import choice, randint
inp = sys.stdin.readline
out = sys.stdout.write
flsh = sys.stdout.flush
sys.setrecursionlimit(10 ** 9)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
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 MI():
	return map(int, inp().strip().split())

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

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines().strip()]

def LI_():
	return [int(x) - 1 for x in inp().strip().split()]

def LF():
	return [float(x) for x in inp().strip().split()]

def LS():
	return inp().strip().split()

def I():
	return int(inp().strip())

def F():
	return float(inp().strip())

def S():
	return inp().strip()

def pf(s):
	return out(s + '\n')

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 main():
	(n, t) = MI()
	if t == 10 and n == 1:
		pf('-1')
	elif t < 10:
		pf(str(t) * n)
	else:
		pf('1' + '0' * (n - 1))
main()


(n, t) = map(int, input().split())
x = 10 ** (n - 1)
y = 10 ** n
flag = 0
for i in range(x, y):
	if i % t == 0:
		c = i
		flag = 1
		break
if flag == 1:
	print(c)
else:
	print('-1')


[n, t] = input().split(' ')
n = int(n)
if len(t) > n:
	print(-1)
else:
	z = n - len(t)
	print(t + '0' * z)


(n, d) = map(int, input().split())
li = ''.join(['1'] + ['0' * (n - 1)])
i = int(li)
done = 0
for j in range(i, i * 10):
	if j % d == 0:
		print(j)
		done = 1
		break
if done == 0:
	print(-1)


(n, t) = list(map(int, input().split()))
m = 10 ** (n - 1)
M = 10 ** n - 1
if M < t:
	print(-1)
else:
	while m % t != 0:
		m += 1
	print(m)


(a, b) = map(int, input().split())
if b == 10:
	a -= 1
s = str(b) + '0' * (a - 1)
print(-1 if a == 0 and b == 10 else s)


line = input().split()
n = int(line[0])
t = int(line[1])
num = int('1' + '0' * (n - 1))
while num % t != 0:
	num += 1
if len(str(num)) == n:
	print(num)
else:
	print('-1')


(n, t) = map(int, input().split())
w = 0
x = 0
l = str(t)
w = 10 ** (n - len(l)) * t
if t == 10 and n < 2:
	w = -1
print(w)


__author__ = 'runekri3'
(n, t) = list(map(int, input().split()))
if n == 1 and t == 10:
	print(-1)
else:
	nines = int('9' * n)
	print(nines // t * t)


import sys
(n, t) = map(int, input().strip().split(' '))
r = '1'
r += '0' * (n - 1)
nx = r + '0'
r = int(r)
nx = int(nx)
for i in range(r, nx):
	if t != 0:
		if i % t == 0:
			print(i)
			sys.exit()
print(-1)


(m, n) = map(int, input().split())
x = -1
for i in range(10 ** (m - 1), 10 ** m):
	if i % n == 0:
		print(i)
		x = 0
		break
if x == -1:
	print(-1)


def result(x, y):
	if x == 1 and y == 10:
		return -1
	if y % 10 == 0:
		return '1' + '0' * (x - 1)
	return str(y) * x
(a, b) = map(int, input().split())
print(result(a, b))


(n, t) = map(int, input().split())
start = 10 ** (n - 1)
stop = start * 10
ans = -1
for i in range(start, stop):
	if i % t == 0:
		ans = i
		break
print(ans)


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

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

def print_arr(arr):
	print(*arr, sep=' ')
(n, t) = inp()
num = sum([10 ** x for x in range(n)])
if t == 10 and n == 1:
	print(-1)
elif t == 10 and n > 1:
	print(num - 1)
else:
	print(num * t)


(n, t) = map(int, input().split())
if t != 10:
	output = [str(t)] * n
	print(int(''.join(output)))
elif t == 10:
	if n == 1:
		print(-1)
	else:
		output1 = ['1'] + ['0'] * (n - 1)
		print(int(''.join(output1)))


(n, t) = map(int, input().split())
ans = 1
for i in range(1, n):
	ans *= 10
if n == 1 and t == 10:
	print(-1)
else:
	t = t % 10
	if t == 0:
		t = 1
	print(ans * t)


l1 = [int(num) for num in input().split(' ')]
n = l1[0]
t = l1[1]
k = -1
for i in range(pow(10, n - 1), pow(10, n)):
	if i % t == 0:
		k = i
		break
print(k)


(n, t) = list(map(int, input().strip().split()))
if len(str(t)) == n:
	print(t)
else:
	for i in range(10 ** (n - 1), 10 ** n):
		if i % t == 0:
			print(i)
			break
	else:
		print(-1)


(n, t) = input().split()
(n, t) = (int(n), int(t))
if t == 10:
	if n > 1:
		ans = '1' * (n - 1)
		ans += '0'
	else:
		ans = -1
else:
	ans = str(t) * n
print(ans)


(n, t) = map(int, input().split())
flag = False
for i in range(int('1' + '0' * (n - 1)), int('9' * n) + 1):
	if not i % t:
		flag = True
		print(i)
		break
if not flag:
	print(-1)


(n, t) = map(int, input().split())
a = 0
for number in range(10 ** (n - 1), 10 ** n):
	if number % t == 0:
		print(number)
		a = 1
		break
if a == 0:
	print(-1)


(n, t) = map(int, input().split())
if t > int(n * '9'):
	print(-1)
else:
	ans = int('1' + (n - 1) * '0')
	while ans % t != 0:
		ans += 1
	print(ans)


(N, T) = map(int, input().split())
if N == 1:
	print(T if T != 10 else -1)
else:
	ans = int('1' + '0' * (N - 1))
	for i in range(10):
		if (ans + i) % T == 0:
			print(ans + i)
			break


(n, t) = [int(x) for x in input().split(' ')]
if len(str(t)) > n:
	print(-1)
else:
	print(str(t) + ''.join(('0' for x in range(n - len(str(t))))))


def main():
	k = 0
	(n, t) = list(map(int, input().split()))
	for i in range(10 ** (n - 1), 10 ** n):
		if i % t == 0:
			k = 1
			print(i)
			break
	if k != 1:
		print(-1)
main()


(x, y) = map(int, input().split())
f = 0
for i in range(10 ** (x - 1), 10 ** x):
	if i % y == 0:
		f = 1
		print(i)
		break
if f == 0:
	print(-1)


(n, t) = map(int, input().split())
if t < 10:
	t = str(t)
	res = t * n
elif n == 1:
	res = -1
else:
	res = 10 ** (n - 1)
print(res)


(n, t) = map(int, input().split(' '))
x = 10 ** (n - 1)
while x < 10 ** n:
	if x % t == 0:
		print(x)
		break
	x += 1
else:
	print(-1)


l = input()
(n, t) = l.split()
n = int(n)
t = int(t)
flag = 0
for i in range(10 ** (n - 1), 10 ** n):
	if i % t == 0:
		print(i)
		flag += 1
		break
if flag == 0:
	print('-1')


(n, t) = map(int, input().split())
if n < 2 and t > 9:
	print(-1)
elif t > 9:
	t = str(t)
	num = t[0] * (n - 1) + t[-1]
	print(num)
else:
	num = str(t) * n
	print(num)


(n, t) = map(int, [int(x) for x in input().split()])
a = 10 ** (n - 1) + t - 10 ** (n - 1) % t
if len(str(a)) == n:
	print(a)
else:
	print(-1)


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

def fi():
	return float(input())

def si():
	return input()

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

def li():
	return list(mi())
(n, t) = mi()
if n == 1 and t == 10:
	print(-1)
	exit()
a = 10 ** (n - 1)
for i in range(a, a + t):
	if i % t == 0:
		print(i)
		exit()
print(-1)


(n, t) = map(int, input().split(' '))
if n == 1 and t == 10:
	print(-1)
else:
	ans = int('1' * n)
	while ans % t != 0:
		ans += 1
	print(ans)


import math
(n, t) = map(int, input().split())
if n == 1 and t == 10:
	print(-1)
elif t != 10:
	num = 1
	while n != 0:
		num = num * 10
		n -= 1
	l = math.floor(math.log(num, t))
	s = t ** l
	print(s)
else:
	count = 1
	var = 1
	while count < n:
		var = var * 10
		count += 1
	print(var)


p = input().split()
a = int(p[0])
m = int(p[1])
k = 10 ** (a - 1)
for i in range(k, k + 100):
	if i % m == 0:
		x = i
		break
if x >= 10 ** a:
	print(-1)
else:
	print(x)


(a, b) = input().split()
c = '1'
for i in range(1, int(a)):
	c += '0'
c = int(c)
while True:
	if len(str(c)) > int(a):
		break
	if c % int(b) == 0:
		print(c)
		break
	c += 1
if len(str(c)) > int(a):
	print('-1')


(n, t) = map(int, input().split())
a = int('1' + '0' * (n - 1))
b = int('9' * n)
c = 1
for i in range(a, b + 1):
	if i % t == 0:
		c = 0
		print(i)
		break
if c == 1:
	print(-1)


(n, t) = map(int, input().split())
if t == 10 and n == 1:
	print(-1)
else:
	print(str(t) + '0' * (n - len(str(t))))


(a, b) = map(int, input().split(' '))
k = 10 ** (a - 1)
s = '' + str(b)
if len(s) <= a:
	while k % b != 0:
		k += 1
	print(k)
else:
	print(-1)


(a, b) = map(int, input().split())
p = 10 ** (a - 1)
for i in range(p, 10 ** a):
	if i % b == 0:
		print(i)
		exit(0)
print(-1)


(n, t) = map(int, input().split())
if t == 10:
	if n < 2:
		print(-1)
	else:
		print('1', '0' * (n - 1), sep='')
else:
	print(str(t) * n)


(N, T) = map(int, input().split())
if N == 1 and T == 10:
	print(-1)
else:
	num = 1 * 10 ** (N - 1)
	for x in range(num, num + 10):
		if x % T == 0:
			print(x)
			break


import sys
input = sys.stdin.readline

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

def factorial(x, m):
	val = 1
	while x > 0:
		val = val * x % m
		x -= 1
	return val

def fact(x):
	val = 1
	while x > 0:
		val *= x
		x -= 1
	return val

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

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

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

def upper_bound(a, x, lo=0, hi=None):
	if hi == None:
		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 and n > 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 and n > 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)]
	(prime[0], prime[1]) = (False, False)
	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(100000.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
spf = [0 for i in range(MAXN)]

def factoriazation(x):
	res = []
	for i in range(2, int(x ** 0.5) + 1):
		while x % i == 0:
			res.append(i)
			x //= i
	if x != 1:
		res.append(x)
	return res

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

def float_array():
	return list(map(float, input().strip().split()))

def str_array():
	return input().strip().split()
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
from itertools import permutations
import math
from bisect import bisect_left

def solve():
	(n, t) = map(int, input().split())
	if len(str(t)) > n:
		print(-1)
		return
	if t == 10:
		print(int(str(1) * (n - 1) + '0'))
		return
	print(int(str(t) * n))
for _ in range(1):
	solve()


(n, t3) = map(int, input().split())
t = int('1' + '0' * (n - 1))
t1 = int('9' + '9' * (n - 1)) + 1
for i in range(t, t1):
	if i % t3 == 0:
		print(i)
		exit()
print(-1)


(n, t) = (int(x) for x in input().split())
a = 10 ** (n - 1)
b = 10 ** n
for i in range(a, b):
	if i % t == 0:
		print(i)
		exit()
print(-1)


(a, b) = input().split()
a = int(a)
b = int(b)
c = b
if a == 1 and b <= 9:
	print(b)
elif a == 1 and b > 9:
	print(-1)
elif a == len(str(b)):
	print(b)
else:
	for i in range(a):
		c = c * 10
		if len(str(c)) == a:
			print(c)
			exit()


(n, t) = map(int, input().split())
haha = ['1']
final = []
for i in range(n - 1):
	haha.append('0')
	final.append('9')
final.append('9')
hudai = int(''.join(final))
result = ''.join(haha)
result = int(result)
bina_karone = 0
for i in range(result, hudai + 1):
	if i % t == 0:
		bina_karone = i
		break
if bina_karone > 0:
	print(bina_karone)
else:
	print(-1)


a = [int(i) for i in input().split(' ')]
m = str()
n = a[0]
t = a[1]
if t == 10:
	m = (n - 1) * '1' + '0'
else:
	m = n * str(t)
if n == 1 and t == 10:
	m = '-1'
print(m)


import sys
import math
input = sys.stdin.readline

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

def str_array():
	return input().strip().split()

def lower_letters():
	lowercase = []
	for i in range(97, 97 + 26):
		lowercase.append(chr(i))
	return lowercase

def upper_letters():
	uppercase = []
	for i in range(65, 65 + 26):
		uppercase.append(chr(i))
	return uppercase
(n, m) = int_array()
min_n = int('1' + '0' * (n - 1))
max_n = int('9' + '9' * (n - 1)) + 1
ans = 0
for i in range(min_n, max_n):
	if i % m == 0:
		ans = i
		break
if ans == 0:
	print(-1)
else:
	print(ans)


(n, t) = map(int, input().split())
if t > pow(10, n) - 1:
	print(-1)
	quit()
num = 10 ** (n - 1)
print(num + t - num % t)


import sys

def main(n, k):
	base = 10 ** (n - 1)
	top = 10 ** n
	while base < top:
		if base % k == 0:
			return base
		base += 1
	return -1
for (e, line) in enumerate(sys.stdin.readlines()):
	(n, k) = list(map(int, line.strip().split()))
print(main(n, k))


str = input()
arr = str.split()
n = int(arr[0])
t = int(arr[1])
x = (10 ** n - 1) // t
y = x * t
if y == 0:
	print(-1)
	exit()
print(y)


(n, t) = list(map(int, input().split()))
p = ['0'] * (n - 1)
p.insert(0, '1')
po = int(''.join(p))
for x in range(10):
	if n == 1 and t == 10:
		print('-1')
		break
	elif po % t == 0:
		print(po)
		break
	else:
		po += 1


(a, b) = [int(i) for i in input().split()]
s = str(b) * a
if b == 10:
	s = '1' * (a - 1) + '0'
if b >= 10 and a == 1:
	print(-1)
else:
	print(s)


import math
import collections
import bisect
import heapq
import time
import random
import itertools
import sys
(n, t) = map(int, input().split())
ans = 10 ** n - 1
ans //= t
ans *= t
if ans > 0 and len(str(ans)) == n:
	print(ans)
else:
	print(-1)


(n, l) = [int(x) for x in input().split()]

def solve():
	if n == 1 and l == 10:
		return -1
	num = 10 ** (n - 1)
	for i in range(10):
		if (num + i) % l == 0:
			return num + i
	assert False
	return -1
print(solve())


(n, m) = input().split(' ')
n = int(n)
m = int(m)
start = pow(10, n - 1)
flag = True
for i in range(start, start + 9):
	if i % m == 0:
		print(i)
		flag = False
		break
if flag:
	print(-1)


(n, k) = map(int, input().split())
if n == 1:
	if k == 10:
		print(-1)
	else:
		print(k)
else:
	print((10 ** (n - 1) // k + 1) * k)


(n, t) = map(int, input().split())
if t == 2 or t == 4 or t == 8:
	print('8' + '0' * (n - 1))
elif t == 3 or t == 9:
	print('9' + '0' * (n - 1))
elif t == 5:
	print('5' + '0' * (n - 1))
elif t == 6:
	print('6' + '0' * (n - 1))
elif t == 7:
	print('7' + '0' * (n - 1))
elif n > 1:
	print('10' + '0' * (n - 2))
else:
	print('-1')


(n, t) = map(int, input().split())
if n == 1 and t == 10:
	print(-1)
elif n != 1 and t == 10:
	print(int('1' * (n - 1) + '0'))
else:
	print(int(''.join([str(1 * t)] * n)))


import sys
import math
(n, t) = map(int, input().split())
l = 10 ** (n - 1)
r = 10 ** n - 1
r -= r % t
if l > r:
	print(-1)
	sys.exit()
print(r)


(n, t) = input().split()
n = int(n)
t = int(t)
if t == 10:
	if n == 1:
		print(-1)
	else:
		for i in range(0, n - 1):
			print(1, end='')
		print(0)
else:
	for i in range(0, n):
		print(t, end='')


(n, t) = map(int, input().split())
nach = int('1' + (n - 1) * '0')
kon = int(str(nach) + '0') - 1
rez = 0
while rez == 0 and nach <= kon:
	if nach % t == 0:
		rez = nach
		nach += 1
	else:
		nach += 1
if rez == 0:
	print(-1)
else:
	print(rez)


(a, b) = list(map(int, input().split(' ')))
c = 10 ** (a - 1)
while c < 10 ** a:
	if c % b == 0:
		print(c)
		break
	c = c + 1
else:
	print(-1)


(n, t) = map(int, input().split())
start = pow(10, n - 1)
end = pow(10, n)
c = 0
for i in range(start, end):
	if i % t == 0:
		print(i)
		c = 1
		break
if c == 0:
	print('-1')


(m, n) = [int(i) for i in input().split()]
if n == 10:
	if m == 1:
		print(-1)
	else:
		print('10' + '0' * (m - 2))
else:
	print(str(n) + '0' * (m - 1))


import sys
l = list(map(int, input().split(' ')))
n = l[0]
t = l[1]
d = 1
n -= 1
if n == 0:
	for i in range(9):
		if (i + 1) % t == 0:
			print(i + 1)
			sys.exit()
while n:
	d *= 10
	n -= 1
p = d * 10
while d < p:
	if d % t == 0:
		print(d)
		sys.exit()
	else:
		d += 1
print('-1')


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
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 [int(x) for x in sys.stdin.readline().split()]

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 main():
	(n, k) = LI()
	if n == 1 and k > 9:
		return -1
	if k == 10:
		return 10 ** (n - 1)
	return str(k) * n
print(main())


(n, t) = list(map(int, input().split(' ')))
if n == 1 and t == 10:
	print('-1')
elif n > 1:
	i = 10 ** n
	j = i % t
	k = i - j
	if len(str(k)) < len(str(10 ** (n - 1))):
		print('-1')
	else:
		while len(str(k)) != len(str(10 ** (n - 1))):
			k -= t
		print(k)
else:
	print(t)


(n, t) = map(int, input().split())
result = '1' + '0' * (n - 1)
result = int(result)
a = t - result % t
if result % t == 0:
	print(result)
elif len(str(result + a)) == n:
	print(result + a)
else:
	print(-1)


(n, t) = [int(p) for p in input().split()]
if t == 10 and n == 1:
	print(-1)
elif t == 10:
	print('1' + str('0' * (n - 1)))
else:
	print(str(t) + str('0' * (n - 1)))


(n, t) = map(int, input().split())
k = 0
c = 0
for i in range(10 ** (n - 1), 10 ** n):
	if i % t == 0:
		k += 1
		c = i
		break
if k == 1:
	print(c)
else:
	print(-1)


(a, b) = map(int, input().split())
l = '1' + '0' * (a - 1)
h = '9' * a
l = int(l)
h = int(h)
for i in range(l, h + 1):
	if i % b == 0:
		print(i)
		break
else:
	print(-1)


def main():
	mode = 'filee'
	if mode == 'file':
		f = open('test.txt', 'r')
	get = lambda : [int(x) for x in (f.readline() if mode == 'file' else input()).split()]
	[n, t] = get()
	if n == 1 and t == 10:
		print('-1')
		return
	if n == 1:
		print(t)
		return
	for i in range(10 ** (n - 1), 10 ** (n - 1) + t + 1):
		if i % t == 0:
			print(i)
			return
	if mode == 'file':
		f.close()
main()


inn = list(map(int, input().split(' ')))
if inn[1] == 10:
	if inn[0] != 1:
		print(10 ** (inn[0] - 1))
	else:
		print(-1)
else:
	print(10 ** (inn[0] - 1) * inn[1])


(n, t) = [int(a) for a in input().split()]
if n == 1 and t == 10:
	print(-1)
elif t == 10:
	print(t * 10 ** (n - 2))
else:
	print(t * 10 ** (n - 1))


import math

def solve(n, t):
	if t == 10:
		if n == 1:
			return -1
		return '1' + '0' * (n - 1)
	return f'{t}' * n
	return

def main():
	arr = list(map(int, input().split(' ')))
	print(solve(*arr))
main()


(n, t) = map(int, input().split())
num = '1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111'
enum = '9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999'
c = 0
s = int(num[0:n])
e = int(enum[0:n])
for i in range(s, e + 1):
	if i % t == 0:
		c = 1
		break
if c == 0:
	print(-1)
else:
	print(i)


(n, t) = [int(i) for i in input().split()]
if t == 10 and n == 1:
	print(-1)
elif t == 10 and n > 1:
	print('8' * (n - 1) + '0')
elif t <= 10:
	print(str(t) * n)


(n, t) = list(map(int, input().split(' ')))
print(int('1' * n) * t if t != 10 else -1 if n == 1 else int('1' * (n - 1)) * t)


(n, t) = map(int, input().split(' '))
s = int('1' + '0' * (n - 1))
k = int('1' + '0' * n)
for j in range(s, k):
	l = str(j)
	if len(l) == n:
		if j % t == 0:
			k = 1
			print(j)
			break
if k != 1:
	print('-1')


d = [int(x) for x in input().split(' ')]
l = '1' + (d[0] - 1) * '0'
u = l + '0'
cond = False
for x in range(int(l), int(u)):
	if x % d[1] == 0:
		print(x)
		cond = True
		break
if cond == False:
	print(-1)


(n, t) = input().split()
print((t + (int(n) - len(t)) * '0', -1)[len(t) > int(n)])


(n, m) = map(int, input().split())
(k, s, l) = ('1', '1', 0)
for i in range(n):
	k = k + '0'
	if i < n - 1:
		s = s + '0'
for i in range(int(s), int(k)):
	if i % m == 0:
		l = l + 1
		print(i)
		break
if l == 0:
	print(-1)


def sol(n, t):
	a = 10 ** (n - 1)
	b = 10 * a - 1
	while a <= b:
		if a % t:
			a += 1
		else:
			print(a)
			return 0
	print(-1)
	return 0
(n, t) = map(int, input().split())
sol(n, t)


def findNumber(n, d):
	ans = ''
	if d != 10:
		ans += str(d)
		for i in range(1, n):
			ans += '0'
	elif n == 1:
		ans += '-1'
	else:
		ans += '1'
		for i in range(1, n):
			ans += '0'
	return ans
(n, d) = map(int, input().split())
print(findNumber(n, d))


(n, t) = (int(x) for x in input().split())
if 10 ** n <= t:
	print(-1)
else:
	print((10 ** n // t + (10 ** (n - 1) + t - 1) // t) // 2 * t)


(n, d) = map(int, input().split())
if d == 10:
	if n == 1:
		print('-1')
	else:
		for i in range(n - 1):
			print(1, end='')
		print(0)
else:
	for i in range(n):
		print(d, end='')


(a, b) = input().split()
a = int(a)
b = int(b)
i = 10 ** (a - 1)
while i < 10 ** a:
	if i % b == 0:
		print(i)
		exit()
	else:
		i = i + 1
print(-1)


(n, m) = map(int, input().split())
for i in range(10 ** (n - 1), 10 ** n):
	if i % m == 0:
		print(i)
		exit()
print(-1)


(n, t) = map(int, input().split())
if n == 1 and t == 10:
	x = -1
elif t == 10:
	x = t * 10 ** (n - 2) + t
	x = int(x)
else:
	x = t * 10 ** (n - 1)
print(x)


try:
	(n, t) = list(map(int, input().split()))
	num = 1 * 10 ** (n - 1)
	init = num
	f = 0
	while num % t != 0:
		num += 1
		if num >= init * 10:
			print(-1)
			f = 1
			break
	if f == 0:
		print(num)
except:
	pass


(n, t) = map(int, input().split())
a = 1 * 10 ** (n - 1)
b = 1 * 10 ** n - 1
while a <= b:
	if a % t == 0:
		print(a)
		exit(0)
	a += 1
print(-1)


ans = 0
nt = input().split()
n = int(nt[0])
t = int(nt[1])
for x in range(10 ** (n - 1), 10 ** n):
	if x % t == 0:
		print(x)
		ans = 1
		break
if ans == 0:
	print(-1)


(n, t) = input().split()
n = int(n)
t = int(t)
num = int(pow(10, n)) - 1
t = num - num % t
if t != 0:
	print(t)
else:
	print('-1')


(a, b) = input().split()
a = int(a)
b = int(b)
c = ''
for i in range(1, a + 1):
	d = i
	if i > 9:
		d = i % 10
	c = c + str(d)
c = int(c)
while c % b != 0:
	c = c + 1
c = str(c)
if len(c) != a:
	print(-1)
else:
	print(c)


(n, t) = map(int, input().split())
s = '1'
m = 1
s += '0' * (n - 1)
a = '9' * n
s = int(s)
a = int(a) + 1
for i in range(s, a):
	if i % t == 0:
		m = 0
		print(i)
		break
if m == 1:
	print(-1)


ipt = [int(x) for x in input().split()]
n = ipt[0]
t = ipt[1]
ans = 10 ** (n - 1)
bns = ans - ans % t
if bns < ans:
	bns += t
if bns >= ans * 10:
	print(-1)
else:
	print(bns)


(n, t) = map(int, input().split())
if t < 10:
	if t * ((10 ** n - 1) // 9) % t == 0:
		print(t * ((10 ** n - 1) // 9))
	else:
		print(-1)
elif 10 ** (n - 1) % t == 0:
	print(10 ** (n - 1))
else:
	print(-1)


(n, t) = [int(i) for i in input().split()]
abeg = int('1' + '0' * (n - 1))
aend = int('1' + '0' * n)
for i in range(abeg, aend):
	if i % t == 0:
		print(i)
		break
else:
	print(-1)


(n, t) = map(int, input().split())
for i in range(10 ** (n - 1), 10 ** n):
	if not i % t:
		print(i)
		break
else:
	print(-1)


(n, t) = map(int, input().split())
k = True
for i in range(10 ** n - 10, 10 ** n):
	if i % t == 0 and i != 0:
		print(i)
		k = False
		break
if k:
	print(-1)


(n, l) = map(int, input().split())
x = 10 ** (n - 1)
y = 10 ** n
flag = False
while x < y:
	if x % l == 0:
		print(x)
		flag = True
		break
	x += 1
if not flag:
	print(-1)


(n, t) = map(int, input().split())
r = 10 ** (n - 1)
end = 10 ** n
for i in range(r, end):
	if i % t == 0:
		print(i)
		break
else:
	print(-1)


def multiply(number, a):
	result = [0] * len(number)
	for i in reversed(range(len(number))):
		result[i] = number[i] * a
		result[i - 1] += result[i] // 10
		result[i] = result[i] % 10
	return result

def get_number(n, t):
	if t == 10:
		if n == 1:
			return [-1]
		else:
			res = [1] * n
			res[-1] = 0
			return res
	else:
		res = [t] * n
		return res
(n, t) = (int(x) for x in input().split(' '))
answer = get_number(n, t)
print(''.join([str(x) for x in answer]))


(n, t) = map(int, input().split())
if n == 1:
	if t == 10:
		print(-1)
	else:
		print(t)
	exit()
s = '1' * (n - 1)
for i in range(10):
	if int(s + str(i)) % t == 0:
		print(int(s + str(i)))
		break


(n, t) = list(map(lambda x: int(x), input().split()))
if n == 1 and t == 10:
	result = -1
elif t == 10:
	result = 10 ** (n - 1)
else:
	result = str(t) * n
print(result)


(n, t) = map(int, input().split())
s = ''
if t == 10 and n == 1:
	print(-1)
else:
	if n == 1:
		print(t)
	elif n >= 2:
		s = str(t)
		while len(s) < n:
			s += '0'
	print(s)


inputs = [int(i) for i in input().split()]
(n, k) = (inputs[0], inputs[1])
max_no = str()
for i in range(n):
	max_no += '9'
min_no = max_no[1:] if n > 1 else 0
min_no = int(min_no)
max_no = int(max_no)
while max_no > min_no:
	if max_no % k == 0:
		print(max_no)
		break
	max_no -= 1
if max_no == min_no:
	print(-1)


import math
(n, t) = map(int, input().split())
if n == 1 and t == 10:
	print(-1)
elif t != 10:
	l1 = [t] * n
	for i in range(n):
		l1[i] = str(l1[i])
	l1 = ''.join(l1)
	print(l1)
else:
	print('1' + '0' * (n - 1))


(a, b) = input().split()
if int(b) <= 9:
	print(int(a) * str(b))
elif int(b) == 10 and int(a) >= 2:
	print(1 * '1' + (int(a) - 1) * '0')
else:
	i = 1
	b = int(b)
	x = b * i
	if int(a) >= len(str(x)):
		while len(str(x)) != int(a):
			i = i + 1
			x = b * i
		print(x)
	else:
		print(-1)


(n, m) = map(int, input().split())
if n == 1 and m == 10:
	print(-1)
else:
	print(m, end='')
	if m == 10:
		for i in range(1, n - 1):
			print('0', end='')
	else:
		for i in range(1, n):
			print('0', end='')


s = input()
l = list(s.split())
n = int(l[0])
t = int(l[1])
if n == 1:
	if t >= 2:
		if t <= 9:
			print(t)
		else:
			print('-1')
else:
	num = pow(10, n - 1)
	if t != 10:
		print(num * t)
	else:
		print(num)


(n, m) = input().split(' ')
n = int(n)
m = int(m)
q = n
l = []
l1 = []
l.append(1)
l1.append(9)
n -= 1
n1 = 0
flag = 0
while n > 0:
	l.append(0)
	l1.append(9)
	n = n - 1
for i in range(0, len(l)):
	n = n * 10 + l[i]
	n1 = n1 * 10 + l1[i]
for i in range(n, n1 + 1):
	if i % m == 0:
		flag += 1
		print(i)
		break
if flag == 0:
	print(-1)


__author__ = 'lavee_singh'
(n, t) = map(int, input().split())
flag = 0
if n == 1:
	for i in range(1, 10):
		if i % t == 0:
			flag = 1
			print(i)
			break
else:
	for i in range(10 ** (n - 1), 10 ** n):
		if i % t == 0:
			flag = 1
			print(i)
			break
if flag == 0:
	print(-1)


(a, b) = map(int, input().split())
if a == 1 and b == 10:
	print(-1, end='')
else:
	print(b, end='')
	if b == 10:
		for i in range(a - 2):
			print(0, end='')
	else:
		for i in range(a - 1):
			print(0, end='')


(n, t) = map(int, input().split())
x = 10 ** (n - 1)
if t < 10 * x:
	x += t - x % t
	print(x)
else:
	print(-1)


s = input().split(' ')
n = int(s[0])
t = int(s[1])
i = 10 ** (n - 1)
s = 10 ** n
while i < s and i % t != 0:
	i += 1
if i < s:
	print(i)
else:
	print('-1')


n = input().split()
t = int(n[1])
n = int(n[0])
if t > 10 ** n - 1:
	print(-1)
else:
	print(t * (10 ** (n - 1) // t + 1))


(length, delimiter) = map(int, input().split())
number_ten_length = 10 ** (length - 1 - (delimiter > 9))
print([number_ten_length * delimiter, -1][number_ten_length < 1])


a = list(map(int, input().split()))
b = 10 ** (a[0] - 1)
c = 10 ** a[0]
d = True
for r in range(b, c):
	if r % a[1] == 0:
		print(r)
		d = False
		break
if d:
	print('-1')


(count, divisor) = map(int, input().split())
if divisor == 10 and count == 1:
	print(-1)
elif divisor == 10:
	one = str(1) * (count - 1)
	one = one + '0'
	print(one)
else:
	print(str(divisor) * count)


def main():
	(n, t) = map(int, input().split())
	x = 0
	for i in range(10 ** (n - 1) + 1, 10 ** n):
		if i % t == 0:
			x = i
			break
	if x == 0:
		print(-1)
	else:
		print(x)
main()


(n, t) = input().split()
n = int(n)
t = int(t)
top = pow(10, n) - 1
low = pow(10, n - 1)
for i in range(low, top + 1):
	if i % t == 0:
		print(i)
		break
else:
	print(-1)


(n, t) = (int(x) for x in input().split())
start = 1
found = False
for i in range(n - 1):
	start *= 10
finish = start * 10
for i in range(start, finish):
	if i % t == 0:
		print(i)
		found = True
		break
if not found:
	print(-1)


(n, t) = map(int, input().split())
a = '9' * n
a = int(a)
while a % t != 0 and len(str(a)) == n:
	a = a - 1
if a % t == 0 and a != 0:
	print(a)
else:
	print(-1)


(n, t) = map(int, input().split())
for i in range(10 ** (n - 1), 10 ** n):
	if i % t == 0:
		print(i)
		raise SystemExit
print(-1)


(x, y) = map(int, input().split())
min = [1]
max = [9]
for i in range(1, x):
	min.append(0)
	max.append(9)
str1 = ''
for ele in min:
	str1 += str(ele)
min = int(str1)
str1 = ''
for ele in max:
	str1 += str(ele)
max = int(str1)
flag = 0
for j in range(min, max + 1):
	if j % y == 0:
		print(j)
		flag = 1
		break
if flag == 0:
	print(-1)


(a, b) = (int(i) for i in input().split())
if a == 1 and b == 10:
	print(-1)
elif b != 10:
	print(10 ** (a - 1) * b)
else:
	print(10 ** (a - 2) * b)


(n, t) = input().split()
n = int(n)
t = int(t)
ten = '1' + '0' * (n - 1)
if len(str(int(ten) * t)) > n and n == 1:
	print(-1)
elif len(str(int(ten) * t)) > n:
	print(str(int(ten) * t)[:-1])
else:
	print(int(ten) * t)


(n, m) = map(int, input().split())
p = len(str(m))
if n - p < 0:
	print(-1)
	exit(0)
x = 10 ** (n - p)
print(m * x)


(n, t) = map(int, input().split())
s = '0'
for _ in range(n - 1):
	s += '9'
ans = 0
num = int(s)
end = 10 ** n
for i in range(num + 1, end):
	if i % t == 0:
		ans = i
		break
if ans == 0:
	print(-1)
else:
	print(ans)


(n, t) = map(int, input().split())
if t % 10 == 0:
	zeros = n - 2
else:
	zeros = n - 1
if n == 1 and t == 10:
	print(-1)
	exit(0)
x = t
for i in range(zeros):
	x = x * 10
print(x)


(n, m) = map(int, input().split())
x = 10 ** (n - 1)
flag = 0
if n == 1 and m == 10:
	flag = 1
	print(-1)
while flag == 0:
	if x % m == 0:
		flag = 1
		print(x)
	x += 1


s = input()
m = s.split(' ')
n = int(m[0])
t = int(m[1])
small = 1
i = 1
while i <= n - 1:
	small = small * 10
	i = i + 1
big = small * 10 - 1
ost = small % t
if ost == 0:
	f2 = small
else:
	f2 = small + (t - ost)
if f2 <= big:
	print(f2)
else:
	print(-1)


(n, t) = map(int, input().split())
k = 10 ** (n - 1)
while k % t != 0:
	k += 1
if len(str(k)) > n:
	print(-1)
else:
	print(k)


import sys
import math
import bisect

def solve(n, m):
	if n == 1 and m == 10:
		return -1
	a = 1
	for i in range(n - 1):
		a = a * 10
	while a % m:
		a += 1
	return a

def main():
	(n, m) = map(int, input().split())
	print(solve(n, m))
main()


(m, n) = map(int, input().split())
a = '1' + '0' * (m - 1)
a = int(a)
b = []
for i in range(a, 10 * a):
	if i % n == 0:
		b.append(i)
		break
if len(b) == 1:
	print(b[0])
else:
	print(-1)


(n, t) = map(int, input().strip().split())
ans = int('9' * n)
ans -= ans % t
if ans < 1:
	print(-1)
else:
	print(ans)


(n, t) = map(int, input().split())
if n == 1 and t == 10:
	print(-1)
else:
	b = 10 ** (n - 1)
	b += t - b % t
	print(b)


(n1, t1) = input().split()
n = int(n1)
t = int(t1)
count = 0
j = 10 ** (n - 1)
p = 10 ** n - 1
while j <= p:
	if j % t == 0:
		count = count + 1
		print(j)
		exit()
	j = j + 1
if count == 0:
	print('-1')


import math
(N, T) = [int(x) for x in input().split()]
nomre = '1'
nomre += '0' * (N - 1)
if int(nomre) % T == 0:
	print(int(nomre))
else:
	BestNum = math.ceil(int(nomre) / T) * T
	if len(str(BestNum)) > N:
		print(-1)
	elif len(str(BestNum)) < N:
		print(int(nomre) * T)
	else:
		print(BestNum)


(n, m) = map(int, input().split())
k = m
while len(str(k)) < n:
	k *= m
if len(str(k)) != n:
	print(-1)
else:
	print(k)


numers = input()
n = numers.split(' ')
digits = int(n[0])
initial = 10 ** (digits - 1)
divisor = int(n[1])
if initial % divisor == 0:
	print(initial)
elif initial % divisor != 0:
	r = initial * divisor
	if len(str(r)) > digits:
		print(-1)
	else:
		print(r)


(n, t) = map(int, input().split())

def find(n, t):
	for i in range(10 ** (n - 1), 10 ** n):
		if i % t == 0:
			return i
			break
	return -1
print(find(n, t))


(n, t) = input().split()
n = int(n)
t = int(t)
k = len(str(t))
if k <= n:
	print(t * 10 ** (n - k))
else:
	print(-1)


(a, b) = list(map(int, input().split(' ')))
n = b
low = pow(10, a - 1)
high = low * 10
while n < low:
	n *= b
if n >= high:
	print(-1)
else:
	print(n)


(n, t) = [int(i) for i in input().split()]
x = pow(10, n - 1)
y = pow(10, n)
z = -1
for j in range(x, y):
	if j % t == 0:
		z = j
		break
print(z)


number = input().split(' ')
digits = int(number[0])
modular = int(number[1])
upperbound = 10 ** digits
lowerbound = 10 ** (digits - 1)
for i in range(lowerbound, upperbound + 1):
	if i == upperbound:
		print(-1)
		break
	if i % modular == 0:
		print(i)
		break


(n, k) = map(int, input().split())
if n == 1 and k == 10:
	print('-1')
else:
	num = 10 ** (n - 1)
	while num % k != 0:
		num += 1
	print(num)


import math
(n, t) = [int(x) for x in input().split()]
l = pow(10, n) - 1
s = pow(10, n - 1)
p = 0
while l >= s:
	if l % t == 0:
		p = 1
		print(l)
		break
	l -= 1
if p != 1:
	print(-1)


(n, t) = list(map(int, input().split()))
num = '1' + (n - 1) * '0'
num = int(num)
c = 0
while len(str(num)) == n:
	num += 1
	if num % t == 0 and len(str(num)) == n:
		c += 1
		break
if c > 0:
	print(num)
else:
	print(-1)


from math import floor, log10
(n, t) = map(int, input().split())
tmp = t
if floor(log10(t) + 1) > n:
	tmp = -1
else:
	while floor(log10(tmp) + 1) < n:
		tmp = tmp * t
	while floor(log10(tmp) + 1) > n:
		tmp = tmp - t
print(tmp)


num = input()
arr = []
counting = 0
for m in range(0, len(num)):
	if num[m] == ' ':
		arr.append(int(num[counting:m]))
		counting = m + 1
	elif m == len(num) - 1:
		arr.append(int(num[counting:len(num)]))
n = int(pow(10, arr[0] - 1)) + 1
check = False
while check is False:
	if len(str(n)) > arr[0]:
		print(-1)
		break
	if n % arr[1] == 0:
		print(n)
		break
	n += 1


def main():
	(n, m) = map(int, input().split())
	print(int('9' * n) // m * m or -1)
main()


(n, t) = map(int, input().split())
e = (10 ** n - 1) // t * t
if e >= 10 ** (n - 1):
	print(e)
else:
	print(-1)


(n, t) = map(int, input().split())
if t != 10:
	answer = t * 10 ** (n - 1)
	print(answer)
elif n == 1:
	print('-1')
else:
	answer = t * 10 ** (n - 2)
	print(answer)


a = [int(x) for x in input().split()]
f = -1
q = 1
for i in range(a[0] - 1):
	q *= 10
for i in range(q, 10 * q):
	if i % a[1] == 0:
		print(i)
		f = 0
		break
if f == -1:
	print(f)


(n, t) = map(int, input().split())
if t == 10:
	if n == 1:
		o = -1
	else:
		o = '1'
		for i in range(n - 1):
			o = o + '0'
else:
	o = str(t)
	for i in range(n - 1):
		o = o + str(t)
print(o)


n = [eval(i) for i in input().split()]
t = n[1]
n = 10 ** (n[0] - 1)
if n == 1 and t == 10:
	print(-1)
	exit()
for i in range(20):
	if (n + i) % t == 0:
		print(n + i)
		exit()


(digits, div) = map(int, input().split(' '))
number = 1
while True:
	number = number * div
	if len(str(number)) == digits:
		print(number)
		break
	elif len(str(number)) > digits:
		print(-1)
		break


def main():
	(n, t) = map(int, input().split())
	x = 10 ** (n - 1)
	while x % t != 0:
		x += 1
		if x == 10 ** n:
			print(-1)
			return
	print(x)
main()


a = list(map(int, input().split()))
s = 10 ** a[0] - 1
print(-1 if s < a[1] else s // a[1] * a[1])


(n, t) = [int(x) for x in input().split()]
if n >= 4:
	a = ['2520'] + ['0'] * (n - 4)
	print(int(''.join(a)))
elif n == 1 and t != 10:
	print(t)
elif n == 1 and t == 10:
	print(-1)
elif n == 2 and t != 10:
	print(10 * t)
elif n == 2 and t == 10:
	print(20)
elif n == 3 and t != 10:
	print(100 * t)
else:
	print(200)


(n, t) = map(int, input().split(' '))
res = 10 ** n - 1
while res % t != 0:
	res -= 1
if res == 0:
	print(-1)
else:
	print(res)


(n, m) = map(int, input().split())
if n == 1 and m == 10:
	print(-1)
else:
	s = int('1' + '0' * (n - 1))
	if m < 10:
		print(s * m)
	else:
		print(s)


(n, t) = map(int, input().split())
s = '' + str(t)
for i in range(n - len(str(t))):
	s += str('0')
if n == 1 and len(str(t)) > 1:
	print('-1')
else:
	print(s)


x = list(map(int, input().split()))
k = 10 ** (x[0] - 1)
y = 10 ** x[0]
for i in range(k, y):
	if i % x[1] == 0:
		print(i)
		quit()
print(-1)


(n, t) = map(int, input().split(' '))
answer = 0
for a in range(10 ** (n - 1), 10 ** n):
	if a % t == 0:
		answer = a
		break
if answer == 0:
	print(-1)
else:
	print(answer)


(n, t) = [int(x) for x in input().split()]
t_l = len(str(t))
if t_l > n:
	print(-1)
	import sys
	sys.exit()
while t_l < n:
	t *= 2
	t_l = len(str(t))
print(t)


import sys
inp = list(map(int, input().split()))
n = inp[0]
t = inp[1]
for i in range(10 ** (n - 1), 10 ** n):
	if i % t == 0:
		print(i)
		sys.exit()
print(-1)


inp = input()
s = inp.find(' ')
n = int(inp[:s])
t = int(inp[s:])
if n == 1:
	i = 1
else:
	i = 10 ** (n - 1)
b = 10 ** n
y = True
while i < b:
	if i % t == 0:
		print(i)
		y = False
		i = b
	i += 1
if y:
	print('-1')


(n, k) = map(int, input().split())

def func(n, k):
	if n == 1 and k <= 9:
		return k
	else:
		s = 10 ** (n - 1)
	while s % k != 0:
		s = s + 1
		if k > s:
			return -1
	return s
print(func(n, k))


(x, t) = input('').split(' ')
x = int(x)
t = int(t)
number = 1
for i in range(1, x):
	number = number * 10
number2 = number * 10
ans = -1
while number < number2:
	if number % t == 0:
		ans = number
		break
	else:
		number = number + 1
print(ans)


(n, t) = map(int, input().split())
x = 10 ** (n - 1)
r = x % t
x += (t - r) % t
if len(str(x)) != n:
	print(-1)
else:
	print(x)


(n, t) = input().split()
n = int(n)
t = int(t)
if n == 1 and t == 10:
	print(-1)
	exit(0)
res = 1
for i in range(n - 1):
	res *= 10
while res % t != 0:
	res += 1
print(res)


(n, t) = map(int, input().split())
if t == 10:
	if n == 1:
		print(-1)
	else:
		a = [1] * (n - 1) + [0]
		print(*a, sep='')
else:
	a = [t] * n
	print(*a, sep='')


import sys

def main():
	(n, t) = map(int, input().split())
	if t == 10 and n == 1:
		print(-1)
		return
	print(t * 10 ** (n - 1 - t // 10))
	return
sys.exit(main())


(a, b) = map(int, input().split())
c = 10 ** (a - 1)
d = 10 ** a
t = True
for i in range(c, d):
	if i % b == 0:
		print(i)
		t = False
		break
if t == True:
	print(-1)


(n, m) = map(int, input().split())
num = 1
for i in range(n - 1):
	num = num * 10
found = 0
for i in range(10 - (1 if n == 1 else 0)):
	if not (num + i) % m:
		print(str(num + i))
		found = 1
		break
if not found:
	print('-1')


import sys
input = sys.stdin.readline

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

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

def insr():
	s = input()
	return list(s[:len(s) - 1])

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

def main():
	(a, b) = inlt()
	if b <= 9:
		print(str(b) + '0' * max(0, a - 1))
	elif a == 1:
		print(-1)
	else:
		print(str(b) + '0' * max(0, a - 2))
main()


arr = list(map(int, input().split()))
(n, k) = (arr[0], arr[1])
if k == 10 and n == 1:
	print(-1)
elif k == 10:
	print(1, end='')
	for i in range(n - 1):
		print(0, end='')
else:
	for i in range(n):
		print(k, end='')


(n, t) = map(int, input().split())
if n == 1 and t < 10:
	print(t)
elif t in [1, 7]:
	print(str(t) * n)
elif t in [2, 5, 10] and n > 1:
	print('1' * (n - 1) + '0')
elif t in [3, 6, 9]:
	print('1' * (n - 1) + str(t - (n - 1) % t + [0, 3][(n - 1) % 2 != 0 and t == 6]))
elif t in [4, 8]:
	print(['16' + '0' * (n - 2), '1' * (n - 3) + '000'][n > 3])
else:
	print(-1)


(n, t) = map(int, input().split())
for i in range(10 ** (n - 1), 10 ** n):
	if i % t == 0:
		print(i)
		quit()
print(-1)


(n, t) = map(int, input().split())
ans = 10 ** (n - 1)
upper = 10 ** n
while ans < upper:
	if ans % t == 0:
		print(ans)
		break
	ans += 1
if ans == upper:
	print(-1)


(a, b) = map(int, input().split(' '))
if a == 1 and b == 10:
	print(-1)
	quit()
if b == 10:
	print(pow(10, a - 1))
	quit()
print(str(b) + '0' * (a - 1))


(n, r) = input().split()
n = int(n)
r = int(r)
if 2 <= r <= 9:
	a = [r] * n
	b = int(''.join(map(str, a)))
	if b % r == 0:
		print(b)
elif r == 10:
	c = [1] + [0] * (n - 1)
	d = int(''.join(map(str, c)))
	if n > 1 and d % r == 0:
		print(d)
	else:
		print('-1')


(n, t) = map(int, input().split())
if n == 1 and t == 10:
	print('-1')
	exit()
if t < 10:
	print(str(t) * n)
	exit()
if t == 10:
	print('1' + '0' * (n - 1))
	exit()


from math import *
(n, t) = map(str, input().split())
if int(n) < len(str(t)):
	print(-1)
	quit()
s = str(t)
for i in range(0, int(n) - len(t)):
	s += '0'
print(s)


(n, t) = map(int, input().split())
a = 10 ** (n - 1)
c = a % t
if n == 1 and t > 9:
	print(-1)
else:
	print(a + (t - c))


(n, t) = [int(elem) for elem in input().split()]
if t == 10:
	if n == 1:
		print(-1)
	else:
		print(10 ** (n - 1))
else:
	print(int(str(t) * n))


(n, m) = map(int, input().split())
r = 10 ** (n - 1)
c = 0
for i in range(r, 10 ** n):
	if i % m == 0:
		c = 1
		print(i)
		break
if c == 0:
	print(-1)


theNumber = 1
(a, b) = (int(x) for x in input().split())
for i in range(1, a):
	theNumber *= 10
barrier = theNumber * 10
while theNumber % b != 0 and theNumber <= barrier:
	theNumber += 1
if theNumber < barrier:
	print(theNumber)
else:
	print(-1)


(n, t) = map(int, input().split())
if t == 10:
	if n == 1:
		print(-1)
	else:
		output = ''
		for _ in range(n - 1):
			output += '1'
		print(output + '0')
else:
	output = ''
	for _ in range(n):
		output += str(t)
	print(output)


(n, t) = map(int, input().split())
i = 1
if n == 1 and len(str(t)) == 1:
	print(t)
elif n == 1 and t == 10:
	print('-1')
else:
	k = int('9' * (n - 1))
	while 1:
		if len(str(k)) == n and k % t == 0:
			print(k)
			break
		elif len(str(k)) > n:
			print('-1')
			break
		k = k + 1


(n, t) = map(int, input().split())
d = 10 ** (n - 1)
e = 10 ** n
f = 1
for i in range(d, e):
	if i % t == 0:
		print(i)
		f = 0
		break
if f == 1:
	print(-1)


(n, t) = [int(_) for _ in input().split()]
if t == 10 and n == 1:
	print(-1)
else:
	for i in range(10 ** (n - 1), 10 ** n):
		if i % t == 0:
			print(i)
			break


(n, t) = list(map(int, input().split()))
num = 10 ** (n - 1)
end = num * 10
flag = True
while num < end:
	if num % t == 0:
		print(num)
		flag = False
		break
	num += 1
if flag:
	print(-1)


line1 = input().split()
n = int(line1[0])
t = int(line1[1])
if t == 10 and n == 1:
	print(-1)
elif t == 10:
	print(t * pow(10, n - 2))
else:
	print(t * pow(10, n - 1))


(num1, num2) = map(int, input().split())
power = pow(10, num1)
b = False
while power != 1:
	power -= 1
	if power % num2 == 0:
		print(power)
		b = True
		break
if b == False:
	print(-1)


def main():
	(n, t) = map(int, input().split())
	n = 10 ** (n - 1)
	if n == 1 and t == 10:
		print(-1)
	else:
		while n % t != 0:
			n += 1
		print(n)
main()


(n, t) = map(int, input().split())
n = 10 ** n
if t == 10:
	n = n // 10
if n < t:
	print(-1)
	quit()
print(t * n // 10)


(a, b) = map(int, input().split())
c = (10 ** a - 1) // b * b
print([-1, c][c > 0])


(n, t) = map(int, input().strip().split())
if n > 1:
	start = int(''.join((str(e) for e in [9] * (n - 1)))) + 1
	while start % t != 0 and len(str(start)) == n:
		start += 1
	if len(str(start)) > n:
		print(-1)
	else:
		print(start)
else:
	print(t if len(str(t)) == n else -1)


(n, t) = map(int, input().split())
ans = t
while len(str(ans)) <= n:
	if len(str(ans)) == n:
		print(ans)
		exit()
	ans *= t
print(-1)


(n, t) = tuple((int(i) for i in input().split(' ')))
r = -1
x = 10 ** (n - 1)
if n == 1 and t == 10:
	print(-1)
	exit(0)
for i in range(t):
	if (x + i) % t == 0:
		r = x + i
		break
print(r)


(n, k) = map(int, input().split())
if k == 10 and n == 1:
	print(-1)
else:
	print(''.join([str(k), '0' * (n - len(str(k)))]))


s = input().split()
n = int(s[0])
t = int(s[1])
flag = False
for i in range(10 ** (n - 1), 10 ** n):
	if i % t == 0:
		print(i)
		flag = True
		break
if not flag:
	print(-1)


(n, t) = map(int, input().split())
flag = 0
x = 10 ** n
result = x // 10
while result % t != 0 and result < x:
	if result % t == 0:
		break
	elif result % t != 0:
		flag += 1
		result += 1
		continue
if flag == x or len(str(result)) == len(str(x)):
	print('-1')
else:
	print(result)


(n, t) = map(int, input().split())
smallest = 10 ** (n - 1)
ans = None
while smallest < 10 ** n:
	if smallest % t == 0:
		ans = smallest
		break
	smallest += 1
if ans:
	print(ans)
else:
	print(-1)


(n, t) = map(int, input().split())
numb = ''
for i in range(n):
	digitConcat = str(t)[0]
	numb += str(digitConcat)
if t == 10:
	numb = numb[:-1]
	numb += '0'
if t > 9 and n < 2:
	print('-1')
else:
	print(numb)


(n, t) = [int(i) for i in input().split()]
number = '1'
while len(number) < n:
	number += str('0')
number = int(number)
num = 0
while number % t != 0:
	number += 1
	if len(str(number)) > n:
		num = -1
		break
print(num if num < 0 else number)


string = input()
numbers = string.split(' ')
n = int(numbers[0])
t = int(numbers[1])
s = 10 ** (n - 1)
if s % t != 0:
	s -= s % t
	s += t
	if s >= 10 ** n:
		s = -1
print(s)


(n, t) = map(int, input().split())
num = pow(10, n - 1)
for i in range(num, num * 10):
	if i % t == 0:
		print(i)
		exit(0)
print(-1)


(n, m) = [int(x) for x in input().split()]
s = int('1' + '0' * (n - 1))
l = int('9' * n)
num = -1
for i in range(s, l + 1):
	if i % m == 0:
		num = i
		break
print(num)


s = input()
a = s.split(' ')
(n, t) = (int(a[0]), int(a[1]))
L = len(a[1])
x = -1
if L <= n:
	x = t * 10 ** (n - L)
print(x)


(n, k) = [x for x in input().split()]
l1 = len(n)
l2 = len(k)
if l2 > int(n):
	print('-1')
else:
	print(str(k) + (int(n) - l2) * '0')


from sys import stdin
(n, t) = map(int, stdin.readline().split())
if t == 10:
	if n < 2:
		print(-1)
	else:
		print(t ** (n - 1))
else:
	res = [str(t) for i in range(0, n)]
	print(''.join(res))


nt = input().strip().split(' ')
n = int(nt[0])
t = int(nt[1])
ans = int('9' * n) - int('9' * n) % t
if ans <= 0:
	print(-1)
else:
	print(ans)


(n, m) = input().split(' ')
(n, m) = [int(n), int(m)]
s = 10 ** n - 1
if s < m:
	print(-1)
else:
	res = s % m
	s = s - res
	print(s)


(n, t) = map(int, input().split())
num = '1' + (n - 1) * '0'
num = int(num)
if t == 10:
	if n == 1:
		print(-1)
	else:
		print('1' + (n - 1) * '0')
else:
	while True:
		if num % t == 0:
			print(num)
			break
		else:
			num += 1


(n, t) = map(int, input().split())
if len(str(t)) > n:
	print('-1')
elif len(str(t)) == n:
	print(t)
else:
	t = str(t)
	while len(t) < n:
		t += '0'
	print(t)


l = list(map(int, input().split(' ')))
if l[0] == 1:
	if l[1] == 10:
		print(-1)
	else:
		print(l[1])
elif l[0] == 2:
	if l[1] == 1 or l[1] == 2 or l[1] == 3 or (l[1] == 4) or (l[1] == 6):
		print(12)
	elif l[1] == 7:
		print(14)
	elif l[1] == 8:
		print(16)
	elif l[1] == 5:
		print(10)
	elif l[1] == 9:
		print(18)
	else:
		print(10)
else:
	num = pow(10, l[0] - 1)
	while num % l[1] != 0:
		num += 1
	print(num)


a = input()
b = a.split()
n = str(10 ** (int(b[0]) - 1) + int(b[1]) - 10 ** (int(b[0]) - 1) % int(b[1]))
if len(n) != int(b[0]):
	print('-1')
else:
	print(n)


(a, b) = map(int, input().split())
c = []
e = ''
for i in str(b):
	c.append(i)
d = a - len(c)
for i in c:
	e += str(i)
for j in range(0, d):
	e += str(0)
if a < len(c):
	print('-1')
else:
	print(e)


(n, t) = input().split()
n = int(n)
t = int(t)
i = 10 ** (n - 1)
chk = 0
while i < 10 ** n:
	if i % t == 0:
		print(i)
		chk = 1
		break
	i = i + 1
if chk == 0:
	print('-1')


(N, T) = map(int, input().split())
if T != 10:
	print(pow(10, N - 1) * T)
elif N == 1 and T == 10:
	print(-1)
elif T == 10:
	print(pow(10, N - 1))


(n, t) = map(int, input().split())
s = 10 ** (n - 1)
e = 10 ** n
c = 0
for i in range(s, e):
	if i % t == 0:
		print(i)
		c = 1
		break
if c == 0:
	print('-1')


(n, t) = [int(i) for i in input().split()]
mina = 10 ** (n - 1)
maxa = 10 ** n
for a in range(mina, maxa):
	if a % t == 0:
		print(a)
		break
else:
	print(-1)


(n, t) = [int(x) for x in input().split()]
a = 10 ** (n - 1)
while a / 10 ** n < 1:
	if a % t == 0:
		break
	a += 1
if a >= 10 ** n:
	print(-1)
else:
	print(a)


n_t = list(map(int, input().split()))
if n_t[1] == 10:
	number = 10 ** (n_t[0] - 1)
else:
	number = 10 ** (n_t[0] - 1) * n_t[1]
if len(str(number)) == n_t[0] and number % n_t[1] == 0:
	print(number)
else:
	print(-1)


(n, t) = map(int, input().split())
res = 0
if n == 0:
	print(-1)
elif t == 10:
	if n == 1:
		print(-1)
	else:
		res = pow(10, n - 1)
		print(res)
else:
	for i in range(1, n + 1):
		res = res + t * pow(10, n - i)
	print(res)


(n, t) = map(int, input().split())
num = -1
i = 10 ** (n - 1)
border = 10 ** n
while i < border and i % t != 0:
	i += 1
if i != border:
	num = i
print(num)


(n, t) = input('').split()
n = int(n)
t = int(t)
if n == 1 & (t == 10):
	print(-1)
elif t == 10:
	x = 10 ** (n - 2)
	p = x * t
	print(p)
else:
	x = 10 ** (n - 1)
	p = x * t
	print(p)


x = list(map(int, input().split()))
n = x[0]
t = x[1]
l = [str(t) for x in range(n)]
ans = ''.join(l)
if t == 10:
	if int('1' * (n - 1) + '0') == 0:
		print(-1)
	else:
		print(int('1' * (n - 1) + '0'))
elif len(ans) > n:
	print(-1)
else:
	print(int(''.join(l)))


(a, b) = input().strip().split(' ')
(a, b) = [int(a), int(b)]
count = 0
for i in range(10 ** (a - 1), 10 ** a):
	if i % b == 0:
		print(i)
		count = count + 1
		break
if count == 0:
	print(-1)


(n, t) = map(int, input().split())
a = 10 ** (n - 1 - (t > 9))
print([t * a, -1][a < 1])


(n, t) = map(int, input().split())
if n < len(str(t)):
	print(-1)
elif t < 10:
	s = '1' * n
	s = int(s) * t
	print(s)
else:
	s = '1' * (n - 1)
	s = int(s) * t
	print(s)


def get(n):
	a = 1
	for i in range(n - 1):
		a *= 10
	return a
(n, t) = map(int, input().split())
(b, c) = (get(n), get(n + 1))
while b % t != 0 and b < c:
	b += 1
if b == c:
	print(-1)
else:
	print(b)


(n, t) = map(int, input().split())
x = 10 ** (n - 1 - (t == 10))
print([t * x, -1][x < 1])


(n, t) = input().split()
res = '1' * int(n)
res = str(int(res) * int(t))
if t == '10' and n != '1':
	print(res[1:])
elif len(res) != int(n):
	print(-1)
else:
	print(res)


(n, t) = map(int, input().split())
a = (10 ** n - 1) // t * t
print([-1, a][a > 0])


(n, t) = map(int, input().split())
mini = 10 ** (n - 1)
maxi = 10 ** n - 1
counter = mini // t
while 1:
	if t * counter <= maxi and t * counter >= mini:
		print(t * counter)
		break
	elif t * counter > maxi:
		print(-1)
		break
	counter += 1


text = input()
index = 0
for index in range(len(text)):
	if text[index] == ' ':
		break
n = int(text[:index])
t = int(text[index + 1:])
number = -1
x_min = 10 ** (n - 1)
x_max = 10 ** n
for num in range(x_min, x_max):
	if num % t == 0:
		number = num
		break
print(number)


(n, t) = map(int, input().split())
if n < len(str(t)):
	print(-1)
	quit()
print(t * 10 ** (n - len(str(t))))


(n, t) = map(int, input().split())
if t == 10:
	if n > 1:
		print('1' + '0' * (n - 1))
	else:
		print(-1)
else:
	print(chr(t + ord('0')) * n)


(n, t) = map(int, input().split())
if n < len(str(t)):
	print(-1)
elif t != 10:
	print(''.join([str(t) for i in range(n)]))
else:
	print('1' + ''.join(['0' for i in range(n - 1)]))


x = input()
(n, t) = x.split(' ')
n = int(n)
t = int(t)
y = t
len_t = len(str(t))
t *= pow(10, n - len_t)
if t >= y:
	print(t)
else:
	print('-1')


from bisect import bisect_right as br
import sys
from collections import *
from math import *
import re

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
	c = 0
	for i in range(2, n):
		if prime[i]:
			c += 1
	return c

def totient(n):
	(res, p) = (n, 2)
	while p * p <= n:
		if n % p == 0:
			while n % p == 0:
				n = n // p
			res -= int(res / p)
		p += 1
	if n > 1:
		res -= int(res / n)
	return res

def iseven(n):
	return [False, True][0 if n % 2 else 1]

def inp_matrix(n):
	return list(([input().split()] for i in range(n)))

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

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

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

def lcm(a, b):
	return a * b / gcd(a, b)
max_int = sys.maxsize
mod = 10 ** 9 + 7
flag1 = False
flag2 = False
(n, t) = inp_integers()
(a, b) = ([int('1' + '0' * (n - 1)), 1][n == 1], int('9' * n))
for i in range(a, b + 1):
	if i % t == 0:
		flag1 = True
		break
print([-1, i][flag1 == True])


(n, t) = map(int, input().split())
l = 10 ** (n - 1)
r = 10 ** n
for i in range(l, r):
	if i % t == 0:
		print(i)
		exit()
print(-1)


(n, t) = [int(x) for x in input().split()]
answer = False
left = '1'
right = '9'
for i in range(1, n):
	left += '0'
	right += '9'
left = int(left)
right = int(right)
for i in range(left, right + 1):
	if i % t == 0:
		print(i)
		answer = True
		break
if not answer:
	print(-1)


(n, m) = map(int, input().split())
ans = pow(10, n - 1) + 1
ans = ans + (m - ans % m)
if ans >= pow(10, n):
	print(-1)
else:
	print(ans)


(A, B) = list(map(int, input().split()))
if A == 1 and B == 10:
	print(-1)
else:
	Aux = 10 ** (A - 1)
	Cont = Aux % B
	print(B - Cont + Aux)


def oar():
	n = input().split()
	k = int(n[0])
	j = int(n[1])
	m = 10 ** k - 1
	c = e = f = 1
	d = str()
	if k == 1 and j > 9:
		print('-1')
	elif j == 10:
		for i in range(k - 1):
			d += str('1')
		print(d + '0')
	else:
		for i in range(k):
			d += str(j)
		print(d)
oar()


f = 1
(n, t) = map(int, input().split())
ss = int('9' * n)
s = int('0' + '9' * (n - 1)) + 1
while s <= ss:
	if s % t == 0:
		print(s)
		f = 0
		break
	s += 1
if f == 1:
	print(-1)


(n, t) = (int(item) for item in input().split())
l = [1, 2, 3, 4, 5, 6, 7, 8, 9]
num = 0
for i in range(1, n + 1):
	num *= 10
	if i == n:
		num += 0
	else:
		num += i
if num == 0:
	for i in l:
		if i % t == 0:
			num = i
			break
		elif i == 9:
			num = -1
else:
	while num % t != 0:
		num += 1
print(num)


import random
(n, t) = map(int, input().split())
if t == 10:
	if n >= 2:
		n = ['1'] + ['0'] * (n - 1)
		print(''.join(n))
	else:
		print('-1')
else:
	n = [str(t)] * n
	print(''.join(n))


li = list(map(int, input().split()))
n = li[0]
t = li[1]

def solution(n, t):
	for i in range(10 ** (n - 1), 10 ** n):
		if i % t == 0:
			return i
	return -1
print(solution(n, t))


nt = list(map(int, input().split()))
if nt[0] == 1 and nt[1] >= 10:
	print(-1)
else:
	print(min(9, nt[1]) * 10 ** (nt[0] - 1))


(n, t) = [int(i) for i in input().split()]
res = 0
for i in range(10 ** (n - 1), 10 ** n):
	if i % t == 0:
		res = i
		break
if res != 0:
	print(res)
else:
	print(-1)


(n, m) = [int(i) for i in input().split(' ')]
ans = -1
for i in range(10 ** (n - 1), 10 ** n):
	if i % m == 0:
		ans = i
		break
print(ans)


(n, k) = map(int, input().split())
num = 10 ** (n - 1)
if n == 1 and k == 10:
	print('-1')
else:
	for i in range(k):
		if int(num % k) == 0:
			print(num)
			break
		num += 1


(a, b) = [int(i) for i in input().split()]
if len(str(b)) > a:
	print(-1)
else:
	while len(str(b)) < a:
		b = b * 10
	print(b)


(n, t) = map(int, input().split())
c = 0
j = 0
if n == 1 and t == 10:
	print('-1')
elif n == 1 and t < 10:
	print(t)
else:
	for i in range(pow(10, n - 1) + 1, pow(10, n) - 1):
		if i % t == 0:
			j = i
			c = 1
			break
	if c == 1:
		print(j)
	else:
		print('-1')


(a, b) = map(int, input().split())
i = 1
j = '1'
k = 0
m = 0
for m in range(a - 1):
	j = j + '0'
c = int(j)
while 1:
	if c % b == 0:
		if a == len(str(c)):
			print(c)
			k = 1
			break
		elif a < len(str(c)):
			print('-1')
			k = 1
			break
	c += 1


def solve():
	c = 0
	(n, t) = map(int, input().split())
	x = '1' + '0' * (n - 1)
	z = int(x)
	while len(x) == n:
		if int(x) % t == 0:
			print(x)
			c = 1
			break
		else:
			z += 1
			x = str(z)
	if c == 0:
		print('-1')
solve()


i = str.split(input(), ' ')
n = int(i[0])
t = int(i[1])
ans = int('1' + '0' * (n - 1))
up = int('9' * n)
while ans % t > 0:
	ans += 1
if ans > up:
	print(-1)
else:
	print(ans)


(n, t) = map(int, input().split())
flag = 0
start = int('1' + '0' * (n - 1))
end = start * 10
for x in range(start, end):
	if x % t is 0:
		print(x)
		flag = 1
		break
if flag is 0:
	print(-1)


(n, t) = map(int, input().split())
d = 0
c = 10 ** (n - 1)
if n == 1 & t == 10:
	print(-1)
else:
	for j in range(0, 9):
		if c % t == 0:
			print(c)
			d = 1
			break
		else:
			c += 1
	if d == 0:
		print('-1')


(n, db) = input().split()
(n, db) = (int(n), int(db))
exists = False
for i in range(10 ** (n - 1), 10 ** n):
	if i % db == 0:
		print(i)
		exists = True
		break
if exists == False:
	print(-1)


(n, k) = map(int, input().split())
s = '1' * n
s = int(s)
while True:
	if len(str(s)) > n:
		print('-1')
		break
	elif int(s) % k == 0:
		print(s)
		break
	else:
		s += 1


(n, t) = map(int, input().split())
i = 10 ** (n - 1)
j = 10 ** n
f1 = 0
while i < j:
	if i % t == 0:
		print(i)
		break
	i += 1
if i == j:
	print('-1')


(n, t) = list(map(int, input().split()))
if n == 1 and t == 10:
	print(-1)
else:
	print(str(t) + '0' * (n - 1 if t != 10 else n - 2))


(cifier, delitel) = map(int, input().split())
for cislo in range(10 ** (cifier - 1), 10 ** cifier):
	if not cislo % delitel:
		print(cislo)
		exit()
print(-1)


(n, t) = map(int, input().split())
if len(str(t)) > n:
	print(-1)
	exit()
num = int('1' + '0' * (n - 1))
while 1:
	if num % t == 0:
		print(num)
		break
	else:
		num += 1


line = input()
a = []
for x in line.split():
	a.append(int(x))
n = a[0]
t = a[1]
if t == 10:
	if n == 1:
		st = '-1'
	else:
		st = '1' + '0' * (n - 1)
else:
	st = str(t) * n
print(st)


def rangeXY(n):
	firstDigit = '1'
	Middles = '0' * (n - 1)
	return int(firstDigit + Middles)

def main():
	(n, t) = input().split(' ')
	(n, t) = (int(n), int(t))
	divisible: bool = False
	TheNumber = rangeXY(n)
	while len(str(TheNumber)) == n:
		if not TheNumber % t:
			divisible = True
			break
		TheNumber += 1
	if not divisible:
		print(-1)
	else:
		print(TheNumber)
main()


snum = input()
num = snum.split()
n = int(num[0])
t = int(num[1])
gg = ''
if t == 10 and n != 1:
	ans = 10 ** (n - 1)
elif t == 10 and n == 1:
	ans = -1
else:
	for i in range(n):
		gg = gg + str(t)
	ans = int(gg)
print(ans)


(n, t) = map(int, input().split())
ans = (10 ** (n - 1) + t - 1) // t * t
print(-1 if ans >= 10 ** n else ans)


(n, t) = [int(x) for x in input().split()]
import math
if n == 1:
	if t == 10:
		print(-1)
	else:
		print(t)
elif t < 10:
	print(t * 10 ** (n - 1))
else:
	print(10 ** (n - 1))


inp = input().split()
N = int(inp[0])
T = int(inp[1])
sol = 10 ** N - 1
if N == 1 and T == 10:
	print(-1)
elif T == 10:
	print(10 ** (N - 1))
else:
	print(str(T) * N)


def st(a, b):
	s = 1
	for i in range(b):
		s *= a
	return s
(n, t) = [int(i) for i in input().split()]
x = 0
for i in range(350):
	z = st(t, i + 1)
	if len(str(z)) == n:
		x = z
if x:
	print(x)
else:
	print(-1)


(x, y) = map(int, input().split())
a = 10 ** (x - 1)
b = 10 ** x - 1
while b > a:
	if a % y == 0:
		break
	a += 1
if a == y - 1:
	print('-1')
else:
	print(a)


(n, m) = [int(i) for i in input().split()]
num = 10 ** (n - 1)
if num + (m - num % m) > 10 ** n - 1:
	print(-1)
else:
	print(num + (m - num % m))


val = input().split()
(n, t) = (int(val[0]), int(val[1]))
num = 10 ** (n - 1)
limit = 10 ** n
for i in range(num, limit):
	if i % t == 0:
		print(i)
		break
else:
	print(-1)


n = input()
n = n.split()
digits = int(n[0])
div = int(n[1])
flag = False
for i in range(pow(10, digits - 1), pow(10, digits)):
	if i % div == 0:
		flag = True
		break
if flag:
	print(i)
else:
	print(-1)


(n, t) = map(int, input().split())
x = '1'
for i in range(n - 1):
	x += '0'
x = int(x)
y = ''
for i in range(n):
	y += '9'
y = int(y)
for i in range(x, y + 1):
	if i % t == 0:
		print(i)
		break
else:
	print(-1)


(n, t) = map(int, input().split())
a = (pow(10, n - 1) - 1) // t * t + t
print((a, -1)[a >= pow(10, n)])


(z, x) = input().split()
z = int(z)
if x == '10':
	v = z - 2
	a = '9'
	if z >= 2:
		m = v * a
		print(m + x)
	else:
		print(-1)
elif len(x * z) != z:
	print(-1)
else:
	print(x * z)


(n, t) = map(int, input().split())
(ub, lb, k) = ('1', '1', 0)
for i in range(n):
	ub += '0'
for i in range(n - 1):
	lb += '0'
for i in range(int(lb), int(ub)):
	if i % t == 0:
		k = 1
		print(i)
		break
if k != 1:
	print(-1)


p = input().rstrip().split(' ')
n = int(p[0])
t = int(p[1])
g = 10 ** (n - 1)
h = 10 ** n
for i in range(g, h):
	if i % t == 0:
		print(i)
		break
else:
	print(-1)


(n, t) = map(int, input().split())
digi = 10 ** (n - 1)
re = 0
for n in range(digi, digi * 10):
	if n % t == 0:
		re = n
		break
if re == 0:
	print(-1)
else:
	print(re)


(x, y) = map(int, input().split())
num = 10 ** (x - 1)
if y == 10:
	if num < y:
		print(-1)
	else:
		print(num)
else:
	print(num * y)


(n, t) = map(int, input().split())
if t != 10:
	no = ['1']
	for i in range(n - 1):
		no.append(str(0))
	nom = ''.join(no)
	print(int(nom) * t)
else:
	no = ['1']
	for i in range(n - 1):
		no.append(str(0))
	nom = ''.join(no)
	if int(nom) % 10 == 0:
		print(int(nom))
	else:
		print('-1')


def main():
	(n, t) = [int(t) for t in input().split()]
	low = 1
	high = 10 ** n // t
	while low <= high:
		mid = (low + high) // 2
		digit = len(str(t * mid))
		if digit < n:
			low = mid + 1
		elif digit > n:
			high = mid - 1
		if digit == n:
			print(t * mid)
			return
	print(-1)
main()


x = list(map(int, input().split()))
number = 10 ** (x[0] - 1) + 1
while number % 10 ** x[0] != 0:
	if number % x[1] == 0:
		print(number)
		break
	else:
		number += 1
if number % 10 ** x[0] == 0:
	print(-1)


def generate(n):
	if n == 1:
		return 1
	return 10 * generate(n - 1)
(n, k) = input().split()
ans = generate(int(n))
end = generate(int(n) + 1)
state = False
while ans < end:
	if ans % int(k) == 0:
		state = True
		break
	ans += 1
if state:
	print(ans)
else:
	print(-1)


(n, t) = input().split()
n = int(n)
t = int(t)
if n == 1:
	if t < 10:
		print(t)
	else:
		print(-1)
else:
	print(t, end='')
	print('0' * (n - len(str(t))))


x = [int(x) for x in input().split()]
z = 10 ** (x[0] - 1)
if x[1] == 10 and x[0] == 1:
	print('-1')
elif x[1] >= 2 and x[1] <= 9:
	print(x[1] * z)
else:
	print(z * x[1] // 10)


rules = list(map(int, input().split()))
number = ''
if rules[1] == 10 and rules[0] == 1:
	number = -1
elif rules[1] == 10:
	number += str(rules[1])
	number += '0' * (rules[0] - 2)
else:
	number += str(rules[1]) * rules[0]
print(number)


(a, b) = map(int, input().split())
n = 10 ** (a - 1)
N = n * 10
k = 0
if b >= n and b < N:
	print(b)
	k = 1
	n = N = 1
while n < N:
	if n % b == 0:
		print(n)
		k = 1
		break
	n += 1
if k == 0:
	print('-1')


inputt = input()
deux = inputt.split(' ')
n = int(deux[0])
t = int(deux[1])
flag = False
for i in range(pow(10, n - 1), pow(10, n)):
	if i % t == 0:
		print(i)
		flag = True
	if flag:
		break
if not flag:
	print(-1)


def prog():
	(a, b) = map(int, input().split())
	if a == 1 and b == 10:
		print(-1)
	else:
		l = '1'
		for i in range(a - 1):
			l += '0'
		l = int(l)
		print(l + (b - l % b))
prog()


(s, a) = map(int, input().split())
i = len(str(a))
print(-1 if i > s else a * 10 ** (s - i))


def ras(n, t):
	x = 10 ** (n - 1)
	while x < 10 ** n:
		if x % t == 0:
			return x
		else:
			x = x + 1
	else:
		return -1
(n, t) = map(int, input().split())
r = ras(n, t)
print(r)


(a, b) = map(int, input().split())
j = 10 ** (a - 1)
while j % b != 0 and j < 10 ** a:
	j += 1
if j == 10 ** a:
	print(-1)
else:
	print(j)


import sys
(n, t) = map(int, sys.stdin.readline().split())
if n == 1:
	if t == 10:
		print(-1)
	else:
		print(t)
else:
	rem = 1
	for i in range(n - 1):
		rem = 10 * rem % t
	if rem == 0:
		print('1' + '0' * (n - 1))
	else:
		print('1' + '0' * (n - 2) + str(t - rem))


def olesya_and_rodion(n, t):
	for i in range(10 ** (n - 1), 10 ** n):
		if i % t == 0:
			return i
	return -1
f = lambda : map(int, input().split())
(n, t) = f()
print(olesya_and_rodion(n, t))


nt = input().split(' ')
n = int(nt[0])
t = int(nt[1])
p = 10 ** (n - 1)
if p % t == 0:
	print(p)
else:
	p += t - p % t
	if len(str(p)) == n:
		print(p)
	else:
		print(-1)


(a, b) = map(int, input().split())
ans = False
cn = 0
for i in range(10 ** (a - 1), 10 ** a):
	if i % b == 0:
		ans = True
		cn = i
		break
if ans:
	print(cn)
else:
	print(-1)


(n, t) = [int(i) for i in input().split()]
k = 1
while n > 1:
	k = k * 10
	n = n - 1
k2 = k * 10
for i in range(k, k2):
	if i % t == 0:
		print(i)
		exit()
print(-1)


(n, t) = map(int, input().split())
p = pow(10, n - 1)
q = pow(10, n)
while p % t != 0 and p < q:
	p += 1
if p != q:
	print(p)
else:
	print(-1)


def solve(n, t):
	x0 = 1
	for i in range(1, n):
		x0 *= 10
	for x in range(x0, 10 * x0):
		if x % t == 0:
			return x
	return -1
nums = list(map(int, input().split()))
print(solve(nums[0], nums[1]))


(a, b) = list(map(int, input().split()))
c = 0
for i in range(10 ** (a - 1) + 1, 10 ** a):
	if i % b == 0:
		c = 1
		print(i)
		break
if c == 0:
	print(-1)


from sys import stdin, stdout
DEBUG = True

class Scan:

	def __init__(self):
		self.read = stdin.read
		self.input = stdin.readline

	def integer(self, count=1):
		if count == 1:
			return self._integer()
		return [self._integer() for _ in range(count)]

	def _integer(self):
		sym: str = self.read(1)
		while sym != '-' and (not sym.isdigit()):
			sym = self.read(1)
		(number, sign) = (0, -1) if sym == '-' else (int(sym), 1)
		sym: str = self.read(1)
		while sym.isdigit():
			number = number * 10 + int(sym)
			sym = self.read(1)
		return number * sign

	def array(self, func=int, sep=' '):
		if func == str:
			return input().split(sep)
		return list(map(func, input().split(sep)))

	def string(self, count=1):
		if count == 1:
			return self._string()
		return [self._string() for _ in range(count)]

	def _string(self):
		sym = self.read(1)
		while sym in ('\n', '\r', ' '):
			sym = self.read(1)
		s = str()
		while sym not in ('\n', '\r', ' '):
			s += sym
			sym = self.read(1)
		return s

class Write:
	pass

class Number:

	def gcd(self, a, b):
		while b > 0:
			(a, b) = (b, a % b)
		return a

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

class Constants:
	EPS = 10 ** (-9)
	INF = 10 ** 18
	MOD = 10 ** 9 + 7

def solution(scan: Scan, write: Write):
	(n, k) = scan.integer(2)
	if k == 10 and n == 1:
		print(-1)
	elif k == 10:
		print('1' * (n - 1) + str('0'))
	else:
		print(str(k) * n)

def main():
	queries: int = 1
	(scan, write) = (Scan(), Write())
	for _ in range(queries):
		solution(scan, write)
main()


(n, t) = input().split()
n = int(n)
t = int(t)
begin = '1' + '0' * (n - 1)
end = '9' * n
res = -1
for i in range(int(begin), int(end) + 1):
	if i % t == 0:
		res = i
		break
print(res)


(n, t) = map(int, input().split())
a = 5 * 10 ** (n - 1)
if n > 1:
	print(a - a % t)
elif t < 10:
	print(t)
else:
	print(-1)


(n, t) = [int(x) for x in input().split()]
number = int('1' + '0' * (n - 1))
number += t - number % t
print(number if len(str(number)) == n else -1)


(m, t) = map(int, input().split())
for i in range(10 ** (m - 1), 10 ** m):
	if i % t == 0:
		f = 1
		e = i
		break
	else:
		f = 2
if f == 1:
	print(i)
else:
	print(-1)


from sys import stdin, stdout
import sys
import math

def get_int():
	return int(stdin.readline().strip())

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

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

def get_string():
	return stdin.readline().strip()

def op(c):
	return stdout.write(c)
(n, t) = get_ints()
s = '1'
for i in range(n - 1):
	s += '0'
s = int(s)
while len(str(s)) == n:
	if s % t == 0:
		print(s)
		break
	s += 1
else:
	print(-1)


(n, k) = [int(x) for x in input().split()]
if k == 10 and n == 1:
	print('-1')
elif k == 10:
	print(10 ** (n - 1))
else:
	print(*[k] * n, sep='')


from sys import stdin
max_val = int(10000000000000.0)
min_val = int(-10000000000000.0)

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

def read_ints():
	return [int(x) for x in stdin.readline().split()]

def read_str():
	return input()

def read_strs():
	return [x for x in stdin.readline().split()]
(lens, divider) = read_strs()
lens = int(lens)
if len(divider) > lens:
	print(-1)
else:
	print(divider + '0' * (lens - len(divider)))


n = list(map(int, input().split()))
if n[0] == 1 and n[1] == 10:
	print(-1)
elif n[1] == 10:
	x = str(1) * (n[0] - 1) + '0'
	print(x)
else:
	y = str(n[1]) * n[0]
	print(y)


x = list(map(int, input().split()))
n = x[0]
t = x[1]
f = [int(d) for d in str(t)]
l = len(f)
if n < l:
	print(-1)
else:
	p = n - l
	for i in range(p):
		f.append(0)
	r = ''.join(map(str, f))
	print(r)


(n, l) = map(int, input().split())
i = 1
k = n
c = 0
p = ''
while len(p) <= n:
	p = str(l ** i)
	if len(p) == k:
		print(p)
		c = 1
		break
	i += 1
if c == 0:
	print(-1)


(a, b) = map(int, input().split())
i = 1
if a == 1 and b == 10:
	print(-1)
elif b == 10:
	while i <= a - 2:
		print(1, end='')
		i = i + 1
	print(10)
else:
	while i <= a:
		print(b, end='')
		i = i + 1


(n, t) = input().split()
n = int(n)
if n == 1:
	print(t if t != '10' else -1)
	exit(0)
while len(t) < n:
	t += '0'
print(t)


from sys import stdin
(n, t) = list(map(int, stdin.readline().rstrip().split(' ')))
cur = t
temp = t
digits = 0
while temp > 0:
	temp //= 10
	digits += 1
if digits > n:
	print(-1)
	exit()
while True:
	temp = cur
	digits = 0
	while temp > 0:
		temp //= 10
		digits += 1
	if digits == n:
		print(cur)
		exit()
	cur *= t


import math
(n, k) = map(int, input().split())
res = []
res.append('1')
for i in range(n - 1):
	res.append('0')
m = ''
for i in res:
	m += i
m = int(m)
r = m * k
r = str(r)
if len(r) == n:
	print(r)
elif len(r) > n:
	while len(r) != n:
		r = int(r) - k
		r = str(r)
	if r == '0':
		print(-1)
	else:
		print(r)
elif len(r) < n:
	while len(r) != n:
		r = int(r) - k
		r = str(r)
	print(r)


(n, t) = [int(__) for __ in input().strip().split()]
if t == 10:
	if n == 2:
		print(10)
	elif n < 2:
		print(-1)
	else:
		print('1' + (n - 1) * '0')
else:
	print(str(t) * n)


(dig, div) = map(int, input().split())
num = ''
for i in range(dig):
	num += '9'
ans = '-1'
while len(num) == dig and int(num) >= div:
	if int(num) % div == 0:
		ans = num
		break
	num = str(int(num) - int(num) % div)
print(ans)


(n, t) = map(int, input().split())
a = t
while len(str(a)) < n:
	a *= t
if len(str(a)) == n:
	print(a)
else:
	print(-1)


def tenPow(y):
	pass
	result = 1
	for i in range(0, y - 1):
		result *= 10
	return int(result)
s = input()
(n, t) = [int(i) for i in s.split()]
start = tenPow(n)
limit = tenPow(n + 1)
i = tenPow(n)
for i in range(start, limit):
	if i % t == 0:
		print(i)
		exit()
print(-1)


s = input().split()
n = int(s[0])
t = int(s[1])
start = 10 ** (n - 1)
end = 10 ** n - 1
while start % t != 0:
	start += 1
exists = False
for i in range(start, end + 1, t):
	if len(str(start)) == n:
		exists = True
		break
if exists:
	print(start)
else:
	print(-1)


(a, b) = map(int, input().split())
s = '1' + '0' * (a - 1)
for i in range(int(s), int(s + '0')):
	if i % b == 0:
		print(i)
		exit()
print('-1')


(l, t) = input().split()
l = int(l)
t = int(t)
m = 10
f = 1
if l == 1:
	m = 1
elif l == 2:
	m = 10
else:
	for i in range(1, l - 1):
		m = m * 10
i = m
while i < m * 10:
	if i % t == 0:
		f = 0
		print(i)
		break
	i += 1
if f == 1:
	print(-1)


(n, t) = list(map(int, input().split()))
r = ''
if t != 10:
	while n:
		r += str(t)
		n = n - 1
elif n % 2 == 0:
	r = '10' * (n // 2)
else:
	r = '10' * (n // 2) + '0'
if t == 10 and n == 1:
	r = -1
print(r)


(a, b) = map(int, input().split())
k = len(str(b))
if k > a:
	print(-1)
else:
	t = (a - k) * '0'
	print(str(b) + t)


(n, t) = map(int, input().split())
data = [9 for i in range(n)]
result = -1
if n == 1 and t <= 9:
	print(t)
	exit()

def get_result():
	global result
	for i in range(n):
		for j in range(8, -1, -1):
			data[-i - 1] = j
			sum_data = int(''.join(map(str, data)))
			if sum_data % t == 0 and sum_data != 0:
				result = ''.join(map(str, data))
				return
get_result()
print(result)


def get_value():
	(n, t) = [int(val) for val in input().split()]
	min_val = int('1' + '0' * (n - 1))
	max_val = int('9' * n)
	for i in range(min_val, max_val + 1):
		if i % t == 0:
			return i
	return -1
print(get_value())


(n, k) = map(int, input().split())
if n == 1 and k == 10:
	print('-1')
elif k == 10:
	print(10 ** (n - 1) * 3)
else:
	print(10 ** (n - 1) * k)


(n, t) = list(map(int, input().split()))
tmp = 10 ** (n - 1)
tmp += t - tmp % t
if len(str(tmp)) != n:
	if n != 1:
		print(tmp - 10)
	else:
		print(-1)
else:
	print(tmp)


(n, t) = [int(i) for i in input().split()]
if n == 1:
	if t == 10:
		print(-1)
	else:
		print(t)
else:
	print(int(9 * t * 10 ** (n - 2)))


(n, t) = map(int, input().split())
data = n * [0]
if t < 10:
	data[0] = t
	data[-1] = t
elif n == 1:
	print(-1)
	exit(0)
else:
	data[0] = 1
print(''.join(map(str, data)))


(a, b) = map(int, input().split())
hmm = False
for i in range(10 ** (a - 1), 10 ** a + 10):
	if i % b == 0:
		hmm = True
		break
if hmm == True and 10 ** a > b:
	print(i)
else:
	print(-1)


a = list(map(int, input().split()))
s = '1'
b = '1'
c = True
for i in range(1, a[0] + 1):
	if i != 1:
		b += '0'
	s += '0'
for i in range(int(b), int(s)):
	if i % a[1] == 0:
		c = False
		break
if c:
	print(-1)
else:
	print(i)


(n, t) = map(int, input().split())
num = (n - 1) * '9'
e = 0
if num == '':
	num = '1'
if n == 1 and t == 10:
	print(-1)
	e = 1
if not e:
	print(int(num) * t)


(n, t) = map(int, input().split())
print([['1' + '0' * (n - 1), -1][n < 2], str(t) * n][t < 10])


(n, t) = map(int, input().split())
flag = False
l = pow(10, n - 1)
h = pow(10, n)
for i in range(l, h):
	if i % t == 0:
		print(i)
		flag = True
		break
if flag == False:
	print('-1')


(length, divider) = [int(i) for i in input().split()]
k = length - len(str(divider))
if k < 0:
	print('-1')
else:
	divider = str(divider)
	for i in range(k):
		divider = divider + '0'
	print(divider)


n = input().split()
s = 0
for i in range(10 ** (int(n[0]) - 1), 10 ** int(n[0]), 1):
	if i % int(n[1]) == 0:
		print(i)
		s = s + 1
		break
if s == 0:
	print(-1)


from sys import stdin, stdout
(n, t) = map(int, stdin.readline().split())
if t != 10:
	stdout.write(str(t))
	for i in range(n - 1):
		stdout.write('0')
	stdout.write('\n')
elif n == 1:
	stdout.write('-1\n')
else:
	stdout.write(str(t))
	for i in range(n - 2):
		stdout.write('0')
	stdout.write('\n')


(n, t) = map(int, input().split())

def tavan(n, t=1):
	temp = '1'
	for i in range(n - 1):
		temp += '0'
	return int(temp) * t
if t == 10:
	if n == 1:
		print(-1)
	else:
		print(tavan(n))
else:
	print(tavan(n, t))


import sys
input = sys.stdin.readline
(n, m) = map(int, input().strip().split())
if n == 1 and m == 10:
	print(-1)
elif m == 10:
	print('1' + str('0') * (n - 1))
else:
	print(str(m) * n)


(n, s) = map(int, input().split())
if n == 1 and s == 10:
	print(-1)
elif s < 10:
	print(n * str(s))
else:
	print('1' + (n - 1) * '0')


(n, m) = map(int, input().split(' '))
k = 1
j = 0
for i in range(n - 1):
	k = k * 10
for i in range(k, k * 10):
	if i % m == 0 and j != 1:
		j = 1
		print(i)
		break
if j == 0:
	print(-1)


(n, t) = [int(x) for x in input().split()]
a = pow(10, n - 1)
b = pow(10, n)
c = 0
for i in range(a, b, 1):
	if a % t == 0:
		c = 1
		break
	a = a + 1
if c == 1:
	print(a)
else:
	print(-1)


entrada = input().split()
t = int(entrada[1])
if t != 10:
	print(entrada[1] * int(entrada[0]))
elif entrada[0] == '1':
	print(-1)
else:
	print('1' + '0' * (int(entrada[0]) - 1))


(n, t) = map(int, input().split())
p = 10 ** (n - 1)
ost = 10 ** n
oz = 0
for i in range(p, ost):
	if i % t == 0:
		print(i)
		oz = 1
		break
if oz == 0:
	print(-1)


(n, t) = map(int, input().strip().split())
if t != 10:
	print(str(t) * n)
elif n == 1:
	print(-1)
else:
	print(str(1) + '0' * (n - 1))


(n, t) = [int(i) for i in input().split()]
num = 10 ** (n - 1)
if t == 10 and n == 1:
	num = -1
else:
	while True:
		if num % t == 0:
			break
		num += 1
print(num)


(n, m) = map(int, input().split(' ', -1))
small = 1
for i in range(1, n):
	small = 10 * small
big = small * 10
ans = -1
for i in range(small, big):
	if i % m == 0:
		ans = i
		break
print(ans)


def answer(n, t):
	base = int('1' + '0' * n) - 1
	while base % t != 0:
		base -= 1
	if base != 0:
		return base
	return -1
(n, t) = [int(x) for x in input().split()]
print(answer(n, t))


(n, t) = map(int, input().split())
if t >= 2 and t <= 9:
	r = pow(10, n)
	r1 = r // 10 * t
	print(r1)
else:
	r = pow(10, n)
	r1 = r // 100 * t
	if r1 == 0:
		print('-1')
	else:
		print(r1)


(a, b) = map(int, input().split())
r = 10 ** (a - 1)
if a == 1 and b == 10:
	print(-1)
else:
	for i in range(100):
		if r % b == 0:
			print(r)
			break
		else:
			r += 1


import math
(n, t) = map(int, input().split())
c = pow(10, n - 1)
x = 1
if n == 1 and t == 10:
	print('-1')
	x = 0
while c % t != 0:
	c = c + 1
if x != 0:
	print(c)


inps = input().split()
n = int(inps[0])
t = int(inps[1])
start = t
ans = 0
while len(str(start)) < n:
	if len(str(start)) < n / 2:
		start *= start
	else:
		start += start
if len(str(start)) == n:
	print(start)
else:
	print(-1)


a = list(map(int, input().split()))
res = 0
for i in range(10 ** (a[0] - 1), 10 ** a[0]):
	if i % a[1] == 0:
		res = i
		break
print(res if res != 0 else -1)


(n, t) = list(map(int, input().split()))
boo = True
if n == 1:
	val = t
	if len(str(val)) >= 2:
		boo = False
elif len(str(t)) >= 2:
	val = t * 10 ** (n - 2)
else:
	val = t * 10 ** (n - 1)
if boo == False:
	print('-1')
elif val % t != 0:
	print('-1')
else:
	print(val)


(digit, divisor) = map(int, input().split())
if digit == 1 and divisor != 10:
	print(divisor)
elif divisor == 10 and digit == 1:
	print('-1')
elif divisor == 10:
	print('1' + '0' * (digit - 1))
else:
	str1 = '0' * (digit - 1)
	print(f'{divisor}{str1}')


f = lambda : map(int, input().split())
(n, t) = f()
s = 10 ** (n - 1)
while s % t != 0 and s < 10 ** n:
	s += 1
if s == 10 ** n:
	print(-1)
else:
	print(s)


def number(n, m):
	if m == 10:
		if n == 1:
			return -1
		else:
			s = '1'
			for i in range(n - 1):
				s += '0'
			return s
	else:
		s = str(m)
		for i in range(n - 1):
			s += '0'
		return s
(n, m) = map(int, input().split())
print(number(n, m))


from math import pow
(n, t) = [int(i) for i in input().split()]
if t == 10 and n == 1:
	print('-1')
elif t == 10 and n > 1:
	for i in range(0, n - 1):
		print(1, end='')
	print('0')
else:
	for i in range(0, n):
		print(t, end='')


def solve(n, t):
	if t != 10:
		print(str(t) * n)
		return
	if n == 1:
		print(-1)
		return
	print(t ** (n - 1))
(n, t) = [int(value) for value in input().split()]
solve(n, t)


l = list(map(int, input().split()))
n = 10 ** (l[0] - 1)
while n < 10 ** l[0]:
	if n % l[1] == 0:
		print(n)
		exit()
	else:
		n += 1
print(-1)


(n, t) = map(int, input().split())
arr = [1] * n
ans = 0
if t == 10:
	if n == 1:
		ans = -1
	else:
		arr[n - 1] = 0
		for i in arr:
			ans = ans * 10 + i
else:
	for i in arr:
		ans = ans * 10 + i * t
print(ans)


(n, t) = map(int, input().split())
if n == 1 and (t >= 2 and t <= 9):
	print(t)
else:
	num = int('1' + (n - 1) * '0')
	cond = True
	if num & 1:
		num += 1
	while len(str(num)) <= n:
		if num % t == 0:
			cond = False
			break
		else:
			num += 2
	if cond:
		print(-1)
	else:
		print(num)


(a, b) = map(int, input().split())
s = ''
s1 = ''
sum = a - len(s1)
for i in range(1, sum + 1, 1):
	s += str(b)
s += str(b)
if a >= len(str(b)):
	for i in range(0, sum - len(str(b)), 1):
		s1 += s[i]
	print(s1 + str(b))
else:
	print(-1)


from collections import deque
from collections import OrderedDict
import math
import sys
import os
import threading
import bisect
import operator
import heapq
from atexit import register
from io import BytesIO
import io
input = lambda : sys.stdin.readline().rstrip('\r\n')
(n, m) = map(int, input().split())
if m != 10:
	for i in range(n):
		print(m, end='')
elif n == 1:
	print(-1)
else:
	print(1, end='')
	for i in range(n - 1):
		print(0, end='')


(n, t) = map(int, input().split())
maxi = '9' * n
if n == 1:
	mini = 1
else:
	mini = '9' * (n - 1)
	mini = int(mini)
	mini += 1
maxi = int(maxi)
flag = 1
for i in range(mini, maxi + 1):
	if i % t == 0:
		ans = i
		flag = 0
		break
if flag == 1:
	print('-1')
else:
	print(ans)


(n, t) = input().split()
if n == '1' and t == '10':
	print('-1')
elif int(t) != 10:
	print(t * int(n))
else:
	print('1' + '0' * (int(n) - 1))


(N, T) = map(int, input().split())

def rec(x, maxv):
	if x % T == 0:
		return x
	if x >= maxv:
		return -1
	return rec(x + 1, maxv)
print(rec(10 ** (N - 1), 10 ** N - 1))


import math
(n, t) = map(int, input().split())
if n == 1 and t == 10:
	print(-1)
elif t == 10:
	lb = [0] * (n - 2)
	print(10, end='')
	for i in lb:
		print(i, end='')
else:
	ls = [t] * n
	for i in ls:
		print(i, end='')


def noOfDigits(n):
	n = str(n)
	return len(n)
(n, t) = map(int, input().split())
if noOfDigits(t) > n:
	print(-1)
	exit()
while noOfDigits(t) != n:
	t *= 10
print(t)


N = input().split()
A = int(N[0])
B = N[1]
hasil = ''
for i in range(A):
	if B == '10':
		if i != A - 1:
			hasil += B[0]
		else:
			hasil += B[1]
	else:
		hasil += B
if A == 1 and B == '10':
	hasil = int(-1)
print(hasil)


(n, t) = map(int, input().split())
if t < 10:
	print(str(t) * n)
elif t == 10:
	if n == 1:
		print(-1)
	else:
		print('1', '0' * (n - 1), sep='', end='')


(n, t) = map(int, input().split())
st = str(t)
if t == 10:
	if n > 1:
		print(t ** (n - 1))
	else:
		print(-1)
else:
	for i in range(n - 1):
		st += str(t)
	print(int(st))


from math import *
from decimal import Decimal
[n, t] = [int(x) for x in input().split(' ')]
num = int('1' + '0' * (n - 1))
mod = t - num % t
if len(str(num + mod)) != n:
	print(-1)
	exit()
print(num + mod)


(n, k) = map(int, input().split())
flag = 0
for i in range(10 ** (n - 1), 10 ** n):
	if i % k == 0:
		flag = 1
		print(i)
		break
if flag == 0:
	print(-1)


x = []
x = input().split()
x[0] = int(x[0])
x[1] = int(x[1])
for i in range(10 ** (x[0] - 1), 10 ** x[0]):
	if i % x[1] == 0:
		print(i)
		break
else:
	print(-1)


(n, t) = map(int, input().split())
n1 = str(n)
n2 = ''
for i in range(n):
	n2 = n2 + '9'
rem = int(n2) % t
res = int(n2) - rem
if res == 0:
	print('-1')
else:
	print(res)


import math
line = input().split()
n = int(line[0])
t = int(line[1])
if t == 10:
	if n == 1:
		print(-1)
	else:
		out = ''
		for i in range(n - 1):
			out += '1'
		print(out + '0')
else:
	out = ''
	for i in range(n):
		out += f'{t}'
	print(out)


(a, b) = map(int, input().split())
x = (10 ** (a - 1) // b + 1) * b
print(-1 if a == 1 and b == 10 else x)


(n, d) = map(int, input().split())
if n == 1 and d == 10:
	print(-1)
	exit()
elif d == 10:
	ans = [1] * (n - 1) + [0]
else:
	ans = [d] * n
for i in ans:
	print(i, end='')


(y, z) = map(int, input().split())
(y, n) = (int('1' + '0' * (y - 1)), int('9' * y))
for i in range(y, n + 1):
	if i > 0 and i % z == 0:
		print(i)
		break
	else:
		pass
else:
	print('-1')


(x, t) = map(int, input().split())
if t == 10 and x == 1:
	print(-1)
	exit()
n = x - 1
tmp = 1
while n:
	tmp *= 10
	tmp = tmp % t
	n -= 1
if tmp == 0:
	tmp = t
if x == 1:
	print(t)
else:
	print('1' + '0' * (x - 2) + str(t - tmp))


(n, m) = map(int, input().split())
if n < 2 and m == 10:
	print(-1)
else:
	x = 10 ** (n - 1)
	print(x + (m - x % m))


(n, t) = map(int, input().split())
st = 10 ** (n - 1)
limit = 10 ** n
while st % t != 0 and st < limit:
	st += 1
if st == limit:
	print(-1)
else:
	print(st)


(x, y) = [int(a) for a in input().split()]
z = 10 ** (x - 1)
a = 0
for i in range(z + 1, z * 10):
	if i % y == 0:
		a = 1
		print(i)
		quit()
	else:
		continue
if a == 0:
	print(-1)


numbers = [int(x) for x in input().split(' ')]
(olesya_digits, rodion_divider) = (numbers[0], numbers[1])
begin = 10 ** (olesya_digits - 1)
result = -1
for i in range(begin, begin + 9):
	if i % rodion_divider == 0:
		result = i
		break
print(result)


(n, t) = [int(x) for x in input().split()]

def solve(t, n):
	for k in range(10 ** (n - 1) // t + 1, 10 ** n // t + 1):
		if len(str(t * k)) == n:
			return t * k
	return -1
print(solve(t, n))


s = input()
(a, b) = (int(x) for x in s.split())
n = 10 ** (a - 1)
flag = 0
if a == 1:
	if b == 10:
		print(-1)
		flag = 1
if flag == 0:
	for x in range(n, n + 15):
		if x % b == 0:
			print(x)
			break


(n, t) = [int(i) for i in input().split()]
val = ''
if t == 10:
	if n == 1:
		print('-1')
	else:
		val += '1'
		for i in range(0, n - 1):
			val += '0'
		print(val)
else:
	for i in range(0, n):
		val += str(t)
	print(val)


(n, t) = input().split()
n = int(n)
t = int(t)
exp2 = '1' + (n - 1) * '0'
bob = '1' + n * '0'
b = int(bob)
z = 0
e = int(exp2)
for i in range(e + 1, b):
	if i % t == 0:
		z += 1
		print(i)
		break
if z == 0:
	print(-1)


nums = input().split(' ')
n = int(nums[0])
t = int(nums[1])
figure = int('5' + '0' * (n - 1))
diff = figure % t
if n == 1 and t == 10:
	print(-1)
elif n == 1:
	print(t)
else:
	print(figure - diff)


(n, k) = map(int, input().split())
if len(str(k)) > n:
	print(-1)
else:
	x = n - len(str(k))
	print(str(k) + '0' * x)


def math(a, b):
	for i in range(10 ** (a - 1), 10 ** a):
		if i % b == 0:
			return i
			break
	return -1
(a1, b1) = input().split()
a = int(a1)
b = int(b1)
print(math(a, b))


a = input().split()
n = int(a[0])
t = int(a[1])
if t == 10 and n == 1:
	print(-1)
elif t == 10 and n > 1:
	num_str = ''
	for i in range(n - 1):
		num_str += '1'
	num_str += '0'
	print(num_str)
else:
	num_str = '1'
	for i in range(n - 1):
		num_str += '0'
	print(int(num_str) * t)


def main(n, t):
	b = 10 ** (n - 1)
	while b % t != 0:
		b += 1
	if b % t != 0 or len(str(b)) != n:
		return -1
	return b
print(main(*list(map(int, input().split(' ')))))


(n, m) = map(int, input().split())
t = 10 ** (n - 1)
while t % m:
	t += 1
print(t if t < 10 ** n else -1)


(N, K) = input().split()
N = int(N)
K = int(K)
S = '1'
for i in range(0, N - 1):
	S += '0'
ans = int(S)
while ans % K != 0:
	ans += 1
if N == 1 and K == 10:
	print(-1)
else:
	print(ans)


(n, t) = [int(x) for x in input().split()]
p = 0
for i in range(10 ** (n - 1), 10 ** n):
	if i % t == 0:
		print(i)
		p += 1
		exit(0)
	else:
		continue
if p == 0:
	print('-1')


import bisect, math

def foo(n, t):
	if t == 10 and n == 1:
		return -1
	if t != 10:
		return 10 ** (n - 1) * t
	return 10 ** (n - 1)
for _ in range(1):
	(n, m) = map(int, input().split())
	print(foo(n, m))


(n, t) = [int(x) for x in input().split()]
if t == 10 and n > 1:
	num = 1
	for i in range(n - 1):
		num *= 10
	print(num)
elif t == 10 and n == 1:
	print(-1)
else:
	num = 0
	for i in range(n):
		num += pow(10, i)
	num = num * t
	print(num)


(n, t) = list(map(int, input().split()))
if t == 10 and n == 1:
	print(-1)
elif t == 10:
	print(10 ** (n - 1) * 5)
else:
	print(10 ** (n - 1) * t)


(n, t) = list(map(int, input().split()))
ans = 1
import math
if int(math.log10(t)) > n - 1:
	print(-1)
elif t == 10:
	print(str(t)[0] * (n - 2) + str(t))
else:
	print(str(t) * n)


(n, m) = map(int, input().split())
s = 10 ** (n - 1)
d = 10 ** n
q = 3
for i in range(s, d):
	if i % m == 0:
		q = 5
		print(i)
		break
if q != 5:
	print('-1')


def main():
	(n, t) = list(map(int, input().split()))
	a = pow(10, n - 1)
	b = pow(10, n)
	for i in range(a, b):
		if i % t == 0:
			print(i)
			return
	print(-1)
main()


from sys import stdin
(n, t) = map(int, stdin.readline().rstrip().split())
s = 10 ** (n - 1)
if not s % t:
	print(s)
else:
	res = s // t * t + t
	print((-1, res)[len(str(res)) == n])


import sys
(n, t) = [int(x) for x in input().split()]
for i in range(1, n + 1):
	x = 10
	if n - i == 0:
		x = 1
	a = -1
	if i > 1:
		a = 0
	for j in range(1, 10):
		if j % t * (x % t) % t == 0:
			a = j
	if a == -1:
		print(-1)
		sys.exit()
	else:
		print(a, end='')


(n, t) = map(int, input().split())
s = ''
if n == 1 and t != 10:
	print(t)
elif n == 1 and t == 10:
	print(-1)
else:
	for i in range(n - 2):
		if t != 10:
			s += str(t)
		else:
			s += str(1)
	s += str(6 * t)
	print(int(s))


t = list(map(int, input().split()))
c = 0
for i in range(pow(10, t[0] - 1), pow(10, t[0])):
	if i % t[1] == 0:
		c = 1
		break
if c == 1:
	print(i)
else:
	print('-1')


(n, k) = map(int, input().split())
if n == 1 and k == 10:
	print('-1')
	exit()
value = pow(10, n) - 1
ans = value - value % k
print(ans)


numbers = [int(i) for i in input().split()]
n = numbers[0]
t = numbers[1]
if int('9' * n) < t:
	print(-1)
else:
	num = int('1' + (n - 1) * '0')
	if num % t == 0:
		print(num)
	else:
		value = num // t
		print(t * (value + 1))


x = input().split()
n = int(x[0])
t = int(x[1])
if n == 1 and t == 10:
	print('-1')
else:
	if t != 10:
		a = n - 1
		b = '0' * a
		print(t, b, sep='')
	if t == 10:
		a = n - 2
		b = '0' * a
		print(t, b, sep='')


(N, T) = map(int, input().split())
b = T
L = 10 ** (N - 1)
R = 10 ** N - 1
while b < L:
	b *= 2
if b >= L and b <= R:
	print(b)
else:
	print(-1)


(n, t) = map(int, input().split())
a = 10
x = a ** (n - 1)
y = a ** n
while True:
	if x % t == 0:
		print(x)
		break
	if x % t != 0:
		x += 1
	if x >= y:
		print('-1')
		break


s = str(input()).split()
n = int(s[0])
t = int(s[1])
if n == 1 and t == 10:
	print(-1)
else:
	x = 10 ** (n - 1)
	while x % t != 0:
		x += 1
	print(x)


(n, t) = input().split()
(n, t) = (int(n), int(t))
print(t * 10 ** (n - 1)) if t < 10 else print(-1) if n == 1 else print(t * 10 ** (n - 2))


import sys

def crea(digit, n):
	s = ''
	for i in range(n):
		s += digit
	return s
line = input()
r = [int(x) for x in line.split()]
n = r[0]
t = r[1]
if t == 3 or t == 9:
	resp = crea('9', n)
elif t == 10:
	if n == 1:
		resp = -1
	else:
		resp = crea('1', n - 1) + '0'
elif t == 5 or t == 7:
	resp = crea(str(t), n)
elif t == 2 or t == 4 or t == 8:
	resp = crea('8', n)
elif t == 6:
	resp = crea('3', n - 1) + '6'
print(resp)


(x, y) = map(int, input().split())
z = None
if x == 1 and y == 10:
	z = -1
else:
	if y == 10:
		y = 1
	z = str(y) + '0' * (x - 1)
print(z)


import sys
n = 0
t = 0
(n, t) = [int(i) for i in input().split()]
num = 1
num_max = 9
for i in range(1, n):
	num *= 10
	num_max += num * 9
need = t - num % t
num += need
if num > num_max:
	print(-1)
	exit()
print(num)


import sys
(n, m) = map(int, input().split())
i = 10 ** (n - 1)
while i < 10 ** n:
	if i % m == 0:
		print(i)
		sys.exit()
	i += 1
print(-1)


__author__ = 'suvasish'
inp = list(map(int, input().split(' ')))
n = inp[0]
t = inp[1]
x = 2
number = -1
if n > 1:
	x = 10 ** (n - 1)
while x <= 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999:
	s = str(x)
	if len(s) > n:
		break
	elif x % t == 0:
		number = x
		if len(str(number)) == n:
			break
	else:
		x += 1
if number > 0:
	print(number)
else:
	print('-1')


(n, t) = map(int, input().split())
if t == 10 and n == 1:
	print(-1)
	exit(0)

def ln(a):
	r = 0
	while a > 0:
		a = a // 10
		r += 1
	return r
r = t
while ln(r) < n:
	r = r * t
print(r)


(n, t) = [int(i) for i in input().split()]
lst = []
if t == 10:
	if n == 1:
		print(-1)
	else:
		for i in range(n - 1):
			lst.append(str(1))
		lst.append(str(0))
		s = ''.join(lst)
		num = int(s)
		print(num)
else:
	for i in range(n):
		lst.append(str(t))
	s = ''.join(lst)
	num = int(s)
	print(num)


(n, t) = map(int, input().split())
diff = n - len(str(t))
if diff > 0:
	print(t * 10 ** diff)
	exit(0)
elif diff == 0:
	for i in range(1, 10):
		if len(str(t * i)) == n:
			print(t * i)
			exit(0)
print(-1)


(n, t) = [int(i) for i in input().split()]
if t == 10 and n == 1:
	print('-1')
	exit()
if t == 10:
	print(10 ** (n - 1))
else:
	print(t * 10 ** (n - 1))


(n, t) = map(int, input().split())
s = '9' * n
temp = int(s) // t
if temp == 0:
	print(-1)
else:
	ans = temp * t
	if len(str(ans)) == n:
		print(ans)
	else:
		print(-1)


(n, t) = map(int, input().split())
x = int(pow(10, n - 1))
if x % t != 0:
	x = (x // t + 1) * t
res = x if len(str(x)) == n and x % t == 0 else -1
print(res)


from math import pow
(n, t) = map(int, input().split())
Number = 10 ** (n - 1)
if t == 10:
	print(Number if Number >= 10 else -1)
else:
	print(Number * t)


import sys

def get_ints():
	return map(int, sys.stdin.readline().strip().split())
(n, t) = get_ints()
zero = '0'
zero *= n - 1
an = '1' + zero
start = int(an)
en = '9' * n
end = int(en)
find = False
for i in range(start, end + 1):
	if i % t == 0:
		print(i)
		find = True
		break
if find == False:
	print(-1)


import math, fractions, collections
(n, t) = [int(x) for x in input().split()]
c = 1
while len(str(c)) < n:
	c *= 10
while c % t != 0:
	c += 1
print(c if c > 0 and len(str(c)) == n else -1)


(lenn, d) = input().split()
lenn = int(lenn)
d = int(d)
num = 10 ** (lenn - 1)
if lenn == 1 and d == 10:
	print(-1)
else:
	while num % d != 0:
		num += 1
	print(num)


(m, k) = map(int, input().split())
a = 10 ** (m - 1) // k
if len(str((a + 1) * k)) == m:
	print((a + 1) * k)
else:
	print(-1)


(n, m) = list(map(int, input().split()))
if n == 1:
	if m < 10:
		print(m)
	else:
		print(-1)
elif m < 10:
	print(m * 10 ** (n - 1))
else:
	print(10 ** (n - 1))


import math
(n, t) = [int(e) for e in input().split()]
if n == 1 and t < 10:
	print(t)
	exit(0)
s = int('1' + (n - 1) * '0')
while s % t != 0:
	s += 1
if len(str(s)) == n:
	print(s)
else:
	print(-1)


(N, T) = map(int, input().split())
if N == 1 and T == 10:
	print(-1)
elif N == 1:
	print(T)
else:
	ans = ''
	vl = 0
	for i in range(N - 1):
		ans += '1'
		vl = vl * 10 + 1
	vl = vl * 10
	val = (T - vl) % T
	if val < 0:
		val += T
	print(ans + str(val))


x = input().split()
g = int(x[0]) * '9'
y = int(g)
while y != 0:
	if len(str(y)) == int(x[0]) and y % int(x[1]) == 0:
		print(y)
		break
	y = y - 1
else:
	print('-1')


(n, t) = map(int, input().split())
i = 10 ** (n - 1)
j = 10 ** n
flag = 0
while i < j:
	if i % t == 0:
		flag = 1
		break
	else:
		i = i + 1
if flag == 1:
	print(i)
else:
	print('-1')


firstLine = [int(n) for n in input().split()]
digits = firstLine[0]
div = firstLine[1]
num = 1 * 10 ** (digits - 1)
while num % div != 0:
	num += 1
if digits == 1 and div == 10:
	print(-1)
else:
	print(num)


(n, k) = map(int, input().split())
if n == 1 and k == 10:
	print(-1)
else:
	if k == 10:
		n -= 1
	print('%i' % k, end='')
	i = 1
	while i <= n - 1:
		print(0, end='')
		i = i + 1


l = input().split()
s = ''
if l[1] == '10' and l[0] == '1':
	print('-1')
elif l[1] == '10':
	s += l[1]
	for i in range(int(l[0]) - 2):
		s += '0'
	print(s)
else:
	s += l[1]
	for i in range(int(l[0]) - 1):
		s += '0'
	print(int(s))


(n, k) = list(map(int, input().split()))
v = ''
if k == 10:
	if n != 1:
		for i in range(n - 1):
			v += '1'
		v += '0'
		print(v)
	else:
		print(-1)
else:
	for i in range(n):
		v += str(k)
	print(v)


(n, t) = map(int, input().split())
base = 10 ** (n - 1)
i = base
while i < base + 9:
	if i % t == 0:
		print(i)
		break
	else:
		i += 1
else:
	print(-1)


seq = input()
A = seq.split()
n = int(A[0])
t = int(A[1])
if n == 1 and t != 10:
	print(t)
elif n == 1 and t == 10:
	print(-1)
elif t == 10:
	print(t * 10 ** (n - 2))
else:
	print(t * 10 ** (n - 1))


(n, t) = map(int, input().split())
if n == 1 and t == 10:
	print(-1)
else:
	x = 10 ** (n - 1)
	for i in range(x, x + 20):
		if i % t == 0:
			print(i)
			break


def has_div(n, t):
	low = 10 ** (n - 1)
	high = 10 ** n
	for num in range(low, high):
		if num % t == 0:
			return num
	return -1

def main():
	(n, t) = [int(i) for i in input().split()]
	print(str(has_div(n, t)))
main()


(n, t) = [int(j) for j in input().split()]
if t < 10:
	print(n * str(t))
elif n == 1:
	print(-1)
else:
	print(10 ** (n - 1))


import sys
input = []
input_index = 0

def next(type, number=None):

	def next():
		global input, input_index
		while input_index == len(input):
			if sys.stdin:
				input = sys.stdin.readline().split()
				input_index = 0
			else:
				raise Exception()
		input_index += 1
		return input[input_index - 1]
	if number is None:
		result = type(next())
	else:
		result = [type(next()) for _ in range(number)]
	return result
(n, t) = (next(int), next(str))
if n - len(t) >= 0:
	sys.stdout.write(t)
	sys.stdout.write('0' * (n - len(t)))
	sys.stdout.write('\n')
else:
	print(-1)


(n, t) = list(map(int, input().split()))
a = 10 ** (n - 1)
k = a % t
if k > 0:
	a += t - k
if len(str(a)) == n:
	print(a)
else:
	print(-1)


a = input().split()
n = int(a[0])
t = int(a[1])
b = 0
res = 10 ** (n - 1)
while res < 10 ** n:
	if res % t == 0:
		print(res)
		b = 1
		break
	else:
		res += 1
if b == 0:
	print('-1')


import sys
x = input().split()
n = int(x[0])
t = int(x[1])
for i in range(10 ** (n - 1), 10 ** n):
	if i % t == 0:
		print(i)
		sys.exit()
print(-1)


line = input().split(' ')
n = int(line[0])
t = int(line[1])
x = 0
num = ''
if t == 2 or t == 4 or t == 8:
	for i in range(n):
		num += '8'
if t == 3 or t == 9:
	num += '9'
	for i in range(n - 1):
		num += '0'
if t == 6:
	num += '6'
	for i in range(n - 1):
		num += '0'
if t == 5 or t == 10:
	num += '5'
	for i in range(n - 1):
		num += '0'
if t == 7:
	mult7 = 7
	while len(str(mult7)) < n:
		mult7 *= 7
	num = str(mult7)
if n == 1 and t == 10:
	x = 1
	print(-1)
if x == 0:
	print(num)


(n, t) = map(int, input().split())
i = 10 ** (n - 1)
while True:
	if len(str(i)) > n:
		print('-1')
		break
	elif i % t == 0:
		print(i)
		break
	else:
		i += 1


(n, t) = map(int, input().split())
for i in range(int(str('1' + '0' * (n - 1))), int(str('1' + '0' * n))):
	if i % t == 0:
		print(i)
		break
	if i == int(str('1' + '0' * n)) - 1:
		print(-1)
		break


def main():
	(n, t) = map(int, input().split(' '))
	num = 10 ** n
	if num % t == 0:
		num -= t
	else:
		num -= num % t
	if not num:
		num = -1
	print(num)
main()


def rod(n, t):
	v = False
	for i in range(10 ** (n - 1) + 1, 10 ** n):
		if i % t == 0:
			print(i)
			v = True
			break
	if v == False:
		print(-1)
(n, t) = input().strip().split()
rod(int(n), int(t))


(n, t) = map(int, input().split())
begin_num = '1' + '0' * (n - 1)
begin_num = int(begin_num)
last_num = '9' * n
last_num = int(last_num)
for i in range(begin_num, last_num + 1):
	if i % t == 0:
		print(i)
		break
if i == last_num and last_num % t != 0:
	print(-1)


a = input().split()
n = int(a[0])
t = int(a[1])
c = 10 ** (n - 1)
while c % t != 0:
	c += 1
if c < 10 ** n:
	print(c)
else:
	print(-1)


(n, t) = map(int, input().split())
print([t * 10 ** (n - 1 - (t > 9)), -1][n == 1 and t == 10])


def _start(n):
	s = '1'
	t = '0' * (n - 1)
	return int(s + t)

def _end(n):
	return int('9' * n)

def check(n, t):
	start = _start(n)
	end = _end(n)
	while start <= end:
		if start % t == 0:
			return start
		start += 1
	return -1

def main():
	(n, t) = map(int, input().split())
	print(check(n, t))
main()


(n, t) = input().split()
(n, t) = (int(n), int(t))
st = '1'
for i in range(n - 1):
	st += '0'
st = int(st)
m = True
for i in range(st, st * 9 + 1):
	if i % t == 0:
		print(i)
		m = False
		break
if m:
	print(-1)


s = input().split(' ')
n = int(s[0])
t = int(s[1])
l = []
p = 1
if n == 1 and t > 9:
	l.append(-1)
else:
	for x in range(n - 1):
		p = p * 10
	while True:
		if p % t == 0:
			l.append(p)
			break
		else:
			p += 1
for x in l:
	print(x)


p = input()
p = p.split()
n = int(p[0])
t = int(p[1])
m = int('1' + (n - 1) * '0')
q = int(n * '9')
c = 0
e = 0
for i in range(m, q + 1):
	if i % t == 0:
		c = 1
		e = i
		break
if c == 1:
	print(e)
else:
	print(-1)


(n, t) = map(int, input().split())
n1 = (10 ** (n - 1) - 1) // t + 1
n2 = (10 ** n - 1) // t
if n1 <= n2:
	print(n1 * t)
else:
	print(-1)


(n, k) = map(int, input().split())
if len(str(k)) > n:
	print(-1)
else:
	print(k, end='')
	if k != 10:
		for i in range(n - 1):
			print(0, end='')
	else:
		for i in range(n - 2):
			print(0, end='')


import math
import os
import random
import re
import sys
a = list(map(int, input().rstrip().split()))
(n, t) = (a[0], a[1])
k = 10 ** a[0]
p = (k - 1) // t * t
if p > 0:
	print(p)
else:
	print('-1')


arr = input()
(n, t) = arr.split(' ')
n = int(n)
t = int(t)
if n == 1 and t == 10:
	print('-1')
else:
	num = 1
	for i in range(n - 1):
		num *= 10
	while num % t != 0:
		num += 1
	print(num)


(n, t) = input().split()
if int(t) < 10:
	a = [t] * int(n)
	print(''.join(a))
if int(t) == 10:
	if int(n) > 1:
		b = ['1'] * (int(n) - 1)
		b.append('0')
		print(''.join(b))
	else:
		print(-1)


import sys
(l, d) = list(map(int, sys.stdin.read().split()))
if (l, d) == (1, 10):
	print(-1)
else:
	print(d * 10 ** (l - 1 - (1 if d == 10 else 0)))


(n, t) = [int(i) for i in input().split()]
(st, ed) = (10 ** (n - 1), 10 ** n)
for i in range(st, ed):
	if i % t == 0:
		print(i)
		exit(0)
print(-1)


(a, b) = input().split()
saida = b + '0' * (int(a) - len(b))
if a == '1' and b == '10':
	print(-1)
else:
	print(int(saida))


(n, t) = [int(x) for x in input().split()]
x = int('9' * n)
y = x // t
if y == 0:
	print('-1')
else:
	print(y * t)


(n, t) = map(int, input().split())
if n == 1 and t == 10:
	print(-1)
	exit(0)
elif t == 10:
	t = 5
print(t, '0' * (n - 1), sep='')


(n, t) = input().split()
n = int(n)
t = int(t)
e = 1
i = 1
if n >= 1 and n <= 100 and (t >= 2) and (t <= 10):
	while i < n:
		e = e * 10
		i = i + 1
	r = e * 10
	while e < r:
		if e % t == 0:
			break
		elif e % t != 0 and e == r - 1:
			break
		e = e + 1
	if e % t == 0:
		print(e)
	else:
		print('-1')


(n, t) = [int(x) for x in input().split()]
num = 10 ** n - 1
num2 = 10 ** (n - 1) - 1
ans = 0
for i in range(num, num2, -1):
	if i % t == 0:
		ans = i
		break
if ans != 0:
	print(ans)
else:
	print('-1')


import sys
input = sys.stdin.readline
(n, t) = map(int, input().split())
x = len(str(t))
if n < x:
	print(-1)
else:
	temp = 10 ** (n - 1)
	t1 = temp // t
	print(t * (t1 + 1))


a = [int(x) for x in input().split()]
if a[1] != 10:
	for i in range(a[0]):
		print(a[1], end='')
elif a[0] != 1:
	for i in range(a[0] - 1):
		print(1, end='')
	print(0)
else:
	print(-1)


def solve():
	(n, t) = map(int, input().split())
	if n == 1 and t == 10:
		print(-1)
		return
	ans = ''
	if t == 10:
		for i in range(n - 1):
			ans += '1'
		ans += '0'
	else:
		for i in range(n):
			ans += str(t)
	print(ans)
solve()


(a, b) = map(int, input().split())
x = 1
k = -2
a = a - 1
while a:
	x = x * 10
	a = a - 1
for i in range(x, x * 10):
	if i % b == 0:
		k = 0
		print(i)
		break
if k != 0:
	print('-1')


(a, b) = map(int, input().split())
x = 10 ** (a - 1)
while x % b != 0:
	x += 1
print(x) if x % b == 0 and a >= len(str(x)) else print(-1)


(n, t) = map(int, input().split())
c = 3628800
if n >= 7:
	print(c * 10 ** (n - 7))
else:
	ok = False
	for i in range(10 ** (n - 1), 10 ** n):
		if i % t == 0:
			print(i)
			ok = True
			break
	if not ok:
		print(-1)


(n, t) = map(int, input().split(' '))
if n == 1:
	min = 1
	max = 10
elif n == 2:
	min = 10
	max = 100
else:
	for i in range(1, n + 1):
		if i == 1:
			j = 10
		elif i == n:
			j = j * 10
			max = j
		elif i == n - 1:
			j = j * 10
			min = j
		else:
			j = j * 10
for i in range(min, max):
	if i % t == 0:
		print(i)
		break
	elif i == max - 1:
		print(-1)


(n, t) = map(int, input().split())

def solve(n, t):
	if n == 1 and t == 10:
		return -1
	m = 10 ** n - 1
	c = m // t * t
	if c < 10 ** (n - 1):
		return -1
	return c
print(solve(n, t))


s = input()
a = [b.strip() for b in s.split(' ')]
n = int(a[0])
t = int(a[1])
ans = 1
while n > 1:
	ans *= 10
	n -= 1
if t == 10 and ans == 1:
	print('-1')
elif t == 10:
	print(ans)
else:
	print(ans * t)


(n, t) = map(int, input().split(' '))
cur = int('1' + '0' * (n - 1))
while len(str(cur)) == n and cur % t != 0:
	cur += 1
if len(str(cur)) != n or cur % t != 0:
	print(-1)
else:
	print(cur)


def read_numbers():
	return list(map(int, input().split()))
(n, t) = read_numbers()
upper_limit = eval('9' * n)
number = upper_limit // t * t
if len(str(number)) == n and number > 0:
	print(number)
else:
	print(-1)


a = [int(x) for x in input().split()]
b = 10 ** (a[0] - 1)
c = 10 ** a[0]
d = 0
for i in range(b, c):
	if i % a[1] == 0:
		d = i
		break
if d == 0:
	print('-1')
else:
	print(d)


(n, t) = map(int, input().split())
num = 10 ** (n - 1)
while num % t:
	num += 1
if n == 1 and t == 10:
	print(-1)
else:
	print(num)


ntStr = input()
n = int(ntStr.split()[0])
t = int(ntStr.split()[1])
s = 10 ** (n - 1)
while s < 10 ** n:
	if s % t == 0:
		print(s)
		quit()
	s = s + 1
print(-1)


(n, t) = map(lambda x: int(x), input().split())
if n == 1 and t == 10:
	print(-1)
else:
	i = 10 ** (n - 1)
	i += t - i % t
	print(i)


(n, k) = map(int, input().split())
if k == 10 and n == 1:
	print(-1)
	exit()
elif k == 10 and n != 1:
	print(10 ** (n - 1))
	exit()
print(str(k) * n)


s = input().split()
a = int(s[0])
b = int(s[1])
zugo = 0
for i in range(10 ** (a - 1), 10 ** a):
	if i % b == 0:
		print(i)
		zugo = 1
		break
if zugo == 0:
	print(-1)


line = input().split()
n = int(line[0])
t = line[1]
s = ''
if n == 1 and int(t) == 10:
	print(-1)
elif 2 <= int(t) <= 9:
	for i in range(n):
		s = s + t
	print(int(s))
else:
	s = '1'
	for i in range(n - 1):
		s = s + '0'
	print(int(s))


class CodeforcesTask584ASolution:

	def __init__(self):
		self.result = ''
		self.n_t = []

	def read_input(self):
		self.n_t = [int(x) for x in input().split(' ')]

	def process_task(self):
		if len(str(self.n_t[1])) > self.n_t[0]:
			self.result = '-1'
		else:
			res = 10 ** (self.n_t[0] - 1) if self.n_t[1] == 10 else self.n_t[1] * 10 ** (self.n_t[0] - 1)
			self.result = str(res)

	def get_result(self):
		return self.result
Solution = CodeforcesTask584ASolution()
Solution.read_input()
Solution.process_task()
print(Solution.get_result())


from random import randint
import sys

def random_with_N_digits(f):
	range_start = 10 ** (n - 1)
	range_end = 10 ** n - 1
	x = randint(range_start, range_end)
	return x
(n, t) = map(int, input().split())
x = random_with_N_digits(n)
if n == 1 and t >= 10:
	print(-1)
	sys.exit()
while x % t != 0:
	x = random_with_N_digits(n)
if x % t == 0:
	print(x)


l = list(map(int, input().split()))
(n, t) = (l[0], l[1])
if int(n * '9') < t:
	print('-1')
elif t != 10:
	s = str(t)
	print(n * s)
else:
	s = '1'
	print((n - 1) * s + '0')


(a, b) = input().split()
a = int(a)
b = int(b)
x = 1
sum = 1
for i in range(1, a, 1):
	sum = sum * 10
s1 = sum * 10
for i in range(sum, s1, 1):
	if i % b == 0:
		x = 2
		break
	else:
		pass
if x == 2:
	print(i)
else:
	print(-1)


(n, m) = map(int, input().split())
t = 1
i = 0
for i in range(1, n):
	t = t * 10
count = 0
d = m
while d > 0:
	d = d // 10
	count = count + 1
if i < count - 1:
	print(-1)
else:
	a = t % m
	if a == 0:
		print(t)
	else:
		c = m - a
		t = t + c
		print(t)


(n, t) = [int(x) for x in input().split(' ')]
if t < 10:
	ans = str(t) * n
elif n == 1:
	ans = -1
else:
	ans = 10 ** (n - 1)
print(ans)


(n, t) = map(int, input().split())
x = t
a = 10 ** (n - 1)
b = 10 * a
r = 0
r = int((b - 1) // t)
r = r * t
if r < a:
	print(-1)
else:
	print(r)


(n, t) = map(int, input().split())
X = 10 ** n
ans = t * (X // t)
if len(str(ans)) == n and ans > 0:
	print(ans)
elif len(str(ans - t)) == n and ans - t > 0:
	print(ans - t)
else:
	print(-1)


(n, t) = list(map(int, input().split()))
if n == 1 and t == 10:
	print('-1')
	exit()
if t == 10:
	print(t.__str__() + '0' * (n - 2))
	exit()
print(t.__str__() + '0' * (n - 1))


(a, b) = map(int, input().split())
a = int(a)
b = int(b)
i = 10 ** (a - 1)
max = 10 ** a
for j in range(i, max, 1):
	if j % b == 0:
		print(j)
		exit()
print(-1)


import math
(n, t) = (int(x) for x in input().split())
l = math.floor(math.log10(t)) + 1
if n < l:
	print(-1)
else:
	s = str(t) + '0' * (n - l)
	print(s)


(n, t) = (int(x) for x in input().split())
if n == 1:
	if t == 10:
		print(-1)
	else:
		print(t)
else:
	ans = 10 ** (n - 1)
	for i in range(20):
		if not (ans + i) % t:
			print(ans + i)
			exit()


n = [int(x) for x in input().split(' ')]
t = n[1]
n = n[0]
try:
	(start, stop) = (int('9' * (n - 1)) + 1, int('9' * n))
except ValueError:
	start = 1
	stop = int('9' * n)
for i in range(start, stop + 1):
	if i % t == 0:
		print(i)
		exit(0)
print(-1)


(n, t) = [int(i) for i in input().split()]
ans = ''
if t >= 2 and t <= 9:
	ans = str(t) * n
elif n >= 2 and t == 10:
	ans = '1' + '0' * (n - 1)
else:
	ans = -1
print(ans)


(n, t) = map(int, input().split())
st = pow(10, n - 1)
en = pow(10, n)
res = -1
for i in range(st, en):
	if i % t == 0:
		res = i
		break
print(res)


(x, y) = map(int, input().split())
a = int('9' * x)
if a < y:
	print(-1)
else:
	print(a - a % y)


(n, t) = [int(x) for x in input().split()]
start = 10 ** (n - 1)
end = start * 10
res = -1
for i in range(start, end):
	if i % t == 0:
		res = i
		break
print(res)


(t, n) = map(int, input().split())
for i in range(1, 11):
	result = int('1' * (t - 1) + str(i))
	if result % n == 0:
		if len(str(result)) == t:
			print(result)
			break
		else:
			result = str(result)[1:]
			if int(result) == 0:
				print(-1)
				break
			else:
				print(result)
				break


i = input()
s = ''
n = 0
t = 0
notFound = True
for l in i:
	s += l
	if l == ' ':
		n = int(s)
		s = ''
t = int(s)
length1 = '1'
length9 = '9'
for i in range(n - 1):
	length1 += '0'
	length9 += '9'
length1 = int(length1)
length9 = int(length9)
for i in range(length1, length9 + 1):
	if i % t == 0:
		print(i)
		notFound = False
		break
if notFound:
	print(-1)


__author__ = 'User'
(n, t) = map(int, input().split())
if n == 1 and t == 10:
	print(-1)
else:
	s = 10 ** (n - 1)
	while s % t != 0:
		s += 1
	print(s)


def solve(size, divisor):
	base = 10 ** (size - 1)
	rem = divisor - base % divisor
	if rem == divisor:
		return base
	else:
		result = base + rem
		if result >= base * 10:
			return -1
		return result

def tests():

	def check(n, size, divisor):
		return len(str(n)) == size and n % divisor == 0 or n == -1
	import random
	for _ in range(10000):
		n = random.randint(1, 100)
		t = random.randint(2, 10)
		v = solve(n, t)
		assert check(v, n, t), (v, n, t)
	print('Looks good')
(n, t) = map(int, input().split())
print(solve(n, t))


(n, t) = map(int, input().split())
A = [0] * n
if n == 1:
	if t < 10:
		print(t)
	else:
		print('-1')
else:
	for i in range(0, 10):
		A[n - 1] = i
		A[0] = 1
		B = [str(i) for i in A]
		b = int(''.join(B))
		if b % t == 0:
			print(b)
			break
		else:
			pass


(n, t) = map(int, input().split())
if n == 1 and t == 10:
	print('-1')
else:
	result = ''
	if t == 10:
		if n % 2 != 0:
			result += '1'
		n //= 2
	for i in range(1, n + 1):
		result += str(t)
	print(result)


T_ON = 0
DEBUG_ON = 0
MOD = 998244353

def solve():
	(n, t) = read_ints()
	x = (10 ** (n - 1) + t - 1) // t * t
	if len(str(x)) != n:
		print(-1)
	else:
		print(x)

def main():
	T = read_int() if T_ON else 1
	for i in range(T):
		solve()

def dbg(*xargs):
	if DEBUG_ON:
		print(*xargs)
from collections import *
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 read_int():
	return int(input())

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

def print_nums(nums):
	print(' '.join(map(str, nums)))

def YES():
	print('YES')

def Yes():
	print('Yes')

def NO():
	print('NO')

def No():
	print('No')

def fib(n):
	(a, b) = (0, 1)
	for _ in range(n):
		(a, b) = (b, a + b)
	return a

def fib_ns(n):
	assert n >= 1
	f = [0 for _ in range(n + 1)]
	f[0] = 0
	f[1] = 1
	for i in range(2, n + 1):
		f[i] = f[i - 1] + f[i - 2]
	return f

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

def xgcd(a, b):
	(x0, x1, y0, y1) = (0, 1, 1, 0)
	while a != 0:
		((q, a), b) = (divmod(b, a), a)
		(y0, y1) = (y1, y0 - q * y1)
		(x0, x1) = (x1, x0 - q * x1)
	return (b, x0, y0)

def modinv(a, m):
	(g, x, _) = xgcd(a, m)
	if g != 1:
		raise Exception('gcd(a, m) != 1')
	return x % m

def mod_add(x, y):
	x += y
	while x >= MOD:
		x -= MOD
	while x < 0:
		x += MOD
	return x

def mod_mul(x, y):
	return x * y % MOD

def mod_pow(x, y):
	if y == 0:
		return 1
	if y % 2:
		return mod_mul(x, mod_pow(x, y - 1))
	p = mod_pow(x, y // 2)
	return mod_mul(p, p)

def mod_inv(y):
	return mod_pow(y, MOD - 2)

def mod_div(x, y):
	return mod_mul(x, mod_inv(y))

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

def gen_primes(n):
	P = [True for _ in range(n + 1)]
	P[0] = P[1] = False
	for i in range(int(n ** 0.5) + 1):
		if P[i]:
			for j in range(2 * i, n + 1, i):
				P[j] = False
	return P
main()


import math
(a, b) = list(map(int, input().split(' ')))
c = 10 ** (a - 1)
d = 10 ** a
sum = -1
for k in range(c, d):
	if k % b == 0:
		sum = k
		break
print(sum)


(n, u) = map(int, input().split())
if u < 10:
	print(*[u] * n, sep='')
elif n < 2:
	print(-1)
else:
	print(*[1] * (n - 1), sep='', end='')
	print(0)


(a, b) = map(int, input().split())
a = 10 ** (a - 1)
if (a // b + 1) * b >= a * 10:
	print(-1)
else:
	print((a // b + 1) * b)


(m, n) = map(str, input().split())
g = []
m = int(m)
if len(n) != m and m == 1:
	print('-1')
elif n == '10':
	while len(g) + 1 < m:
		g.append('1')
	print(''.join(g) + '0')
else:
	while len(g) < m:
		g.append(n)
	print(''.join(g))


(n, t) = list(map(int, input().split()))
num = 10 ** (n - 1)
x = 10 ** n
count = 0
for j in range(num, x):
	if j % t == 0:
		print(j)
		count += 1
		break
if count == 0:
	print(-1)


(n, t) = map(int, input().split())
r = 0
if t >= 10 ** n:
	r = 1
	print(-1)
else:
	a = 10 ** (n - 1) // t
	k = a * t
	while k < 10 ** n:
		if k >= 10 ** (n - 1):
			print(k)
			r = 1
			break
		k += t
if r == 0:
	print(-1)


(v, m) = [int(i) for i in input().split()]
if v == 1 and m == 10:
	print('-1')
elif int(m) == 10:
	if int(v) % 2 == 1:
		v = v // 2
		print('10' * v + '0')
	else:
		v = v // 2
		print('10' * v)
else:
	print(str(m) * v)


s = input()
s = s.split()
n = int(s[0])
k = int(s[1])
a = 10 ** (n - 1)
x = a + (k - a % k)
if k >= 10 ** n:
	print('-1')
else:
	print(x)


lista = list(map(int, input().split()))
n = lista[0]
t = lista[1]
m = len(str(t))
if m > n:
	print(-1)
else:
	print(10 ** (n - m) * t)


(n, t) = map(int, input().split())
x = t
i = 10 ** (n - 1) // t
f = 0
if len(str(i * t)) == n and i != 0:
	print(i * t)
else:
	while f == 0:
		i += 1
		x = t * i
		if len(str(x)) == n:
			f = 1
		elif len(str(x)) > n:
			f = 1
	if n == len(str(x)):
		print(x)
	else:
		print(-1)


(n, t) = [int(x) for x in input().split()]
s = '1'
for i in range(n - 1):
	s = s + '0'
while int(s) % t != 0:
	s = int(s) + 1
if n < len(str(t)):
	print(-1)
else:
	print(s)


a = list(map(int, input().split()))
if a[0] == 1 and a[1] % 10 == 0:
	print('-1')
elif a[0] > 1 and a[1] % 10 == 0:
	for i in range(a[0] - 1):
		print('1', end='')
	print('0')
else:
	for i in range(a[0]):
		print(a[1], end='')


import math

def constract_number(n, t):
	if n == 1 and t == 10:
		print(-1)
	else:
		print(t, end='')
		if t == 10:
			for i in range(n - 2):
				print(0, end='')
		else:
			for i in range(n - 1):
				print(0, end='')

def main():
	l = list()
	l = input()
	l = l.split()
	l[0] = int(l[0])
	l[1] = int(l[1])
	constract_number(l[0], l[1])
main()


s = input()
(n, t) = map(int, s.split(' '))
a = 10 ** (n - 1)
if n == 1 and t == 10:
	print('-1')
else:
	while a % t != 0:
		a = a + 1
	print(str(a))


(n, t) = map(int, input().split())
stri = '1' * n
stri2 = '1' + '0' * n
stri2 = int(stri2)
stri = int(stri)
stril = 0
count = 0
for i in range(stri, stri2):
	if i % t == 0:
		count += 1
		stril = i
		break
if count != 0:
	print(stril)
else:
	print(-1)


(n, t) = map(int, input().split())
tem = []
if n == 1 and t == 10:
	print(-1)
else:
	t = str(t)
	tem.append(t)
	if t == '10':
		for counter in range(n - 2):
			tem.append('0')
	else:
		for counter in range(n - 1):
			tem.append('0')
	print(''.join(tem))


(n, t) = [int(x) for x in input().split()]
a = 1
if n == 1 and t == 10:
	print(-1)
else:
	for i in range(n - 1):
		a *= 10
	r = a % t
	print(a + t - r)


m = input().split()
n = int(m[0])
t = int(m[1])
x = 0
for i in range(n):
	x *= 10
	x += 1
limit = 10 ** n
while x % t != 0:
	x += 1
if x < limit:
	print(x)
else:
	print('-1')


from sys import stdin, stdout
input = stdin.readline
(n, t) = map(int, input().split())
for i in range(10 ** (n - 1), 10 ** n):
	if i % t == 0 and i != 0:
		stdout.write(str(i))
		exit(0)
stdout.write('-1')


(n, t) = list(map(int, input().split()))
out = t
if t == 10 and n == 1:
	print(-1)
else:
	while len(str(out)) < n:
		out *= t
	print(out)


(n, t) = map(int, input().split())
d = 1
if n == 1 and t == 10:
	print(-1)
elif t >= 10:
	print('{0}'.format(t) + '0' * (n - 2))
else:
	print('{0}'.format(t) * n)


def main():
	(b, a) = input().split(' ')
	a = int(a)
	b = int(b)
	if b == 1 and a == 10:
		print(-1)
	elif a < 10:
		c = 10 ** (b - 1)
		a = a * c
		print(a)
	else:
		c = 10 ** (b - 2)
		a = a * c
		print(a)
main()


(n, t) = map(int, input().split())
if len(str(t)) <= n:
	if '0' in str(t):
		print(str(str(t)[0] * (n - 1)) + '0')
	else:
		print(str(t) * n)
else:
	print('-1')


(n, t) = map(int, input().split())
a = 10 ** (n - 1)
b = 10 ** n - 1
flag = False
if n == 1 and t < 10:
	for i in range(1, 10):
		if i % t == 0:
			break
	print(i)
else:
	for i in range(a, b):
		if i % t == 0:
			flag = True
			break
	if flag:
		print(i)
	else:
		print(-1)


(n, t) = map(int, input().split())

def solve(n, t):
	if t == 10:
		if n == 1:
			return -1
		return '1' + '0' * (n - 1)
	return str(t) * n
print(solve(n, t))


def num(nums):
	(n, t) = nums
	result = ''
	for a in range(n - 1):
		result += str(t)[0]
	result += str(t)[-1]
	if int(result) % t == 0 and len(result) == n and (result != '0'):
		return result
	return -1
nums = input().split()
nums = [int(a) for a in nums]
print(num(nums))


(n, t) = input().split()
if int(n) >= len(t):
	o = 10 ** (int(n) - 1)
	if int(t) <= o:
		print((o - o % int(t)) * 2)
	else:
		print(t)
else:
	print(-1)


(n, t) = map(int, input().split())
x = pow(10, n - 1)
if n == 1:
	if t != 10:
		print(t)
	else:
		print('-1')
elif n == 2:
	if t == 2 or t == 5 or t == 10:
		print(x)
	elif t == 3 or t == 6 or t == 8 or (t == 9) or (t == 4):
		print('72')
	else:
		print('14')
elif n == 3:
	if t == 2 or t == 5 or t == 10:
		print(x)
	elif t == 3 or t == 6 or t == 8 or (t == 9) or (t == 4):
		print('144')
	else:
		print('105')
elif t == 2 or t == 5 or t == 10 or (t == 4) or (t == 8):
	print(x)
elif t == 3 or t == 6 or t == 9:
	print(x + 62)
else:
	y = x // 7
	print((y + 1) * 7)


(n, t) = [int(x) for x in input().split()]
s = '1'
r = '9'
for i in range(1, n):
	s += '0'
	r += '9'
for i in range(int(s), int(r) + 1):
	if i % t == 0:
		print(i)
		break
else:
	print(-1)


from sys import stdin
from collections import defaultdict

def main():
	(n, t) = tuple(stdin.readline().split())
	if n == '1' and t == '10':
		print(-1)
	else:
		t += '0' * (int(n) - len(t))
		print(t)
main()


import sys, os.path
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
sys.setrecursionlimit(10 ** 5)

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

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

def li():
	return list(sys.stdin.readline().strip())

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

def lii():
	return list(map(int, sys.stdin.readline().strip().split()))
print = sys.stdout.write

def solve():
	(a, b) = mii()
	b = str(b)
	if a >= len(b):
		for _ in range(a - len(b)):
			b += '0'
		print(b)
	else:
		print('-1')
for _ in range(1):
	solve()


(a, b) = map(int, input().split())
n = 10 ** (a - 1)
flag = 'F'
while n < 10 ** a:
	if n % b == 0:
		print(n)
		flag = 'T'
		break
	n += 1
if flag == 'F':
	print(-1)


(n, t) = map(int, input().split())
maxD = int('9' * n)
if maxD < t:
	print('-1')
elif n != 1:
	maxD1 = int('9' * (n - 1))
	while t <= maxD1:
		t *= 2
	print(t)
else:
	print(t)


(n, t) = map(int, input().split())
if n == 1 and t == 10:
	print(-1)
elif n == 1:
	print(t)
else:
	l1 = [1]
	for i in range(1, n):
		l1.append(0)
	magic = lambda l1: int(''.join((str(i) for i in l1)))
	l1 = magic(l1)
	a1 = l1 // t
	print(t * (a1 + 1))


(n, t) = map(int, input().split())
begin_num = 10 ** (n - 1)
end_num = 10 ** n
flag = 0
for i in range(begin_num, end_num):
	if i % t == 0:
		print(i)
		flag = 1
		break
	else:
		continue
if flag == 0:
	print(-1)


(a, b) = map(int, input().split())
if b == 10:
	if a == 1:
		print(-1)
	else:
		s = '1' * (a - 1) + '0'
		print(s)
else:
	s = '{}'.format(b)
	print(s * a)


import sys
(n, t) = map(int, sys.stdin.readline().split())
x = 1
flag = 0
n = n - 1
while n > 0:
	x = x * 10
	n = n - 1
y = x * 10
while x < y:
	a = x % t
	if a == 0:
		print(x)
		flag = 1
		break
	x = x + 1
if flag == 0:
	print(-1)


__author__ = 'Bian'
(n, t) = [int(x) for x in input().split()]
if t == 10:
	if n == 1:
		print(-1)
	else:
		print(10 ** (n - 1))
else:
	for i in range(n):
		print(t, end='')
	print()


(n, t) = list(map(int, input().split()))
ans = 0
if t == 10:
	if n == 1:
		ans = -1
	else:
		for it in range(n - 1):
			ans = ans * 10 + 1
		ans *= 10
else:
	for it in range(n):
		ans = ans * 10 + t
print(ans)


L = input().split()
n = int(L[0])
t = int(L[1])
if n == 1 and t == 10:
	print(-1)
else:
	a = 10 ** (n - 1)
	print(a + t - a % t)


s = 10
s1 = []
(n, t) = map(int, input().split())
if n == 1 and t == 10:
	print(-1)
elif t == 10:
	for i in range(n - 2):
		s *= 10
	print(s)
else:
	for i in range(n):
		s1.append(str(t))
	print(''.join(s1))


inp = input().split(' ')
a = int(inp[0])
b = int(inp[1])
temp = 10 ** (a - 1)
while temp % b != 0:
	temp += 1
if temp >= 10 ** a:
	print(-1)
else:
	print(temp)


(n, t) = map(int, input().split())
if n == 1:
	print(-1 if t == 10 else t)
else:
	number = 10 ** (n - 1)
	print(number + t - number % t)


(n, t) = map(int, input().split())

def func():
	if len(str(t)) > n:
		print(-1)
		return
	else:
		ans = str(t)
		for i in range(0, n - len(str(ans))):
			ans = ans + '0'
		print(ans)
func()


(n, t) = map(int, input().split())
if n > 1:
	rangee = 10
	for i in range(n - 2):
		rangee = rangee * 10
else:
	rangee = 1
endAt = rangee * 10
while rangee < endAt:
	if rangee % t == 0:
		print(rangee)
		break
	else:
		rangee = rangee + 1
if rangee >= endAt:
	print('-1')


(n, t) = map(int, input().split())
if n < 1 or n > 100 or t < 2 or (t > 10) or (n == 1 and t == 10):
	print('-1')
elif t == 10:
	result = 10 ** (n - 2) * 10
	print(result)
else:
	result = 10 ** (n - 1) * t
	print(result)


n = list(map(int, input().split()))
smallest_number = 10 ** (n[0] - 1)
if n[0] == 1:
	if n[1] < 10:
		print(n[1])
	else:
		print('-1')
else:
	for i in range(smallest_number):
		if smallest_number % n[1] == 0:
			print(smallest_number)
			break
		smallest_number += 1


from sys import stdin, stdout, stderr, setrecursionlimit
setrecursionlimit(100000)

def debug(*e):
	if not __debug__:
		print(*e, file=stderr)

def dd(*vals):
	import inspect, re
	frame = inspect.getframeinfo(inspect.stack()[1][0])
	vs = re.search('dd\\((.+)\\)', frame.code_context[0]).group(1).split(',')
	if vs:
		debug(','.join(('{0} = {1}'.format(vs[i], v) for (i, v) in enumerate(vals))))

def trace(f):

	def traced(*args, **kw):
		debug('calling {} with args {}, {}'.format(f.__name__, args, kw))
		return f(*args, **kw)
	return traced

def read():
	return stdin.readline().rstrip()

def readarr(sep=None, maxsplit=-1):
	return read().split(sep, maxsplit)

def readint():
	return int(read())

def readintarr(sep=None, maxsplit=-1):
	return [int(a) for a in readarr(sep, maxsplit)]

def write(*args, **kwargs):
	sep = kwargs.get('sep', ' ')
	end = kwargs.get('end', '\n')
	stdout.write(sep.join((str(a) for a in args)) + end)

def writearr(arr, sep=' ', end='\n'):
	stdout.write(sep.join((str(a) for a in arr)) + end)
import math
(n, t) = readintarr()
i = t
while True:
	lent = len(str(i))
	mx = min(n, 5)
	x = int('1' * (n - mx) + str(i))
	if lent == mx and x % t == 0:
		write(x)
		break
	elif lent > mx:
		write(-1)
		break
	i += 1


def make_number(t, n):
	cont = ''
	for i in range(n):
		cont += str(t)
	return cont

def problem(t, n):
	if t == 10:
		if n == 1:
			return -1
		else:
			return 10 ** (n - 1)
	else:
		return str(make_number(t, n))
temp_list = list(map(int, input().split()))
n = temp_list[0]
t = temp_list[1]
print(problem(t, n))


from math import *
(n, t) = input('').split(' ')
n = int(n)
t = int(t)
ll = 1
ul = 9
if n == 1:
	ll = 1
	ul = 9
else:
	ll = '1'
	ul = '9'
	for i in range(n - 1):
		ll = ll + '0'
		ul = ul + '9'
ll = int(ll)
ul = int(ul)
k = False
for i in range(ll, ul + 1):
	if i % t == 0:
		print(i)
		k = True
		break
if k == False:
	print(-1)


import math
(m, n) = map(int, input().split())
temp = 0
for i in range(pow(10, m - 1) + 1, pow(10, m)):
	if i % n == 0:
		temp = 1
		print(i)
		break
if temp == 0:
	print('-1')


(n, t) = tuple(map(int, input().split()))
if len(str(t)) > n:
	print(-1)
elif len(str(t)) == n:
	print(t)
else:
	while len(str(t)) != n:
		t *= 2
	print(t)


(n, t) = map(int, input().split())
x = 10 ** (n - 1)
for i in range(x, 10 ** n):
	if i % t == 0:
		print(i)
		exit()
print(-1)


s = [int(x) for x in input().split()]
a = s[0]
t = s[1]
q = 0
m = pow(10, a - 1)
n = pow(10, a)
for i in range(m, n):
	if i % t == 0:
		q = q + 1
		print(i)
		break
if q == 0:
	print(-1)


(a, b) = map(int, input().split())
count = 0
s = '0' * (a - 1)
c = '1' + s
s1 = '0' * a
c1 = '1' + s1
for i in range(int(c), int(c1)):
	if i % b == 0:
		count += 1
		print(i)
		break
if count == 0:
	print('-1')


(n, t) = map(int, input().split())
if n == 1:
	if t != 10:
		print(t)
	else:
		print(-1)
else:
	numstr = '1' + '0' * (n - 1)
	if len(numstr) > n:
		print(-1)
	else:
		num = int('1' + '0' * (n - 1))
		print(num + (t - num % t))


(x, y) = map(int, input().split())
if x < len(str(y)):
	print('-1')
else:
	print('{}{}'.format(y, '0' * (x - len(str(y)))))


import sys
sys.version
(n, t) = map(int, input().split())
if n >= 1 or (n <= 100 and t >= 2) or t <= 10:
	maaxi = pow(10, n)
	if n != 1:
		minn = pow(10, n - 1)
	else:
		minn = 1
		if t == 9:
			maaxi = 10
		else:
			maaxi = 9
	if maaxi == 9 and t == 10:
		print('-1')
	else:
		for i in range(minn, maaxi):
			if i % t == 0:
				print(i)
				break


__author__ = 'Utena'
(n, t) = input().split()
if len(t) > int(n):
	print(-1)
else:
	print(t + ''.join(['0'] * (int(n) - len(t))))


def resultado(x, y):
	a = 10 ** x
	x = 10 ** (x - 1)
	for i in range(a - 2):
		x = x + 1
		if x % y == 0:
			return x
	return -1
(n, t) = map(int, input().strip().split())
print(resultado(n, t))


(n, m) = map(int, input().split())
e = 0
e += m
while len(str(e)) < n:
	e *= m
if len(str(e)) > n:
	print('-1')
else:
	print(e)


x = input()
x = x.split()
n = int(x[0]) - 1
t = int(x[1])
i = 10 ** n
end = 10 ** (n + 1)
res = -1
while i < end:
	if i % t == 0:
		res = i
		break
	i += 1
print(res)


from random import randint

def random_with_N_digits(n):
	range_start = 10 ** (n - 1)
	range_end = 10 ** n - 1
	return randint(range_start, range_end)
a = input().split()
if int(a[0]) != 1:
	x = random_with_N_digits(int(a[0]) - 1)
	x = str(x)
	if int(a[1]) % 2 == 0:
		x = x + '0'
		while int(x) % int(a[1]) != 0:
			x = random_with_N_digits(int(a[0]) - 1)
			x = str(x)
			x = x + '0'
	elif int(a[1]) % 5 == 0:
		x = x + '5'
		while int(x) % int(a[1]) != 0:
			x = random_with_N_digits(int(a[0]) - 1)
			x = str(x)
			x = x + '5'
	else:
		x = x + '1'
		while int(x) % int(a[1]) != 0:
			x = random_with_N_digits(int(a[0]) - 1)
			x = str(x)
			x = x + '1'
else:
	for i in range(1, 10):
		if i % int(a[1]) == 0:
			x = i
			break
		x = -1
x = int(x)
print(x)


stat = input()
lst = stat.split()
n = int(lst[0])
t = int(lst[1])
for i in range(int('1' + '0' * (n - 1)), int('9' * n) + 1):
	if i % t == 0:
		print(i)
		exit()
print(-1)


(n, t) = map(int, input().split())
if len(str(t)) > n:
	print(-1)
else:
	k = n - len(str(t))
	print(t, end='')
	print(k * '0')


lt = list(input().split())
(n, t) = (int(lt[0]), int(lt[1]))
k = 1 * 10 ** (n - 1)
r = k * 10
f = 0
for i in range(k, r):
	if i % t == 0:
		f = 1
		print(i)
		break
if f == 0:
	print(-1)


(l, d) = list(map(int, input().split()))
tens = 1
for i in range(l):
	tens *= 10
start = tens // 10
f = 0
for i in range(start, tens):
	if i % d == 0:
		f = 1
		break
if f == 1:
	print(i)
else:
	print('-1')


(n, t) = [int(i) for i in input().split()]
start = int('1' + '0' * (n - 1))
end = int('1' + '0' * n)
result = -1
for i in range(start, end):
	if i % t == 0:
		result = i
		break
print(result)


(n, t) = map(int, input().strip().split())
if t == 10:
	if n == 1:
		print(-1)
	else:
		print(10 ** (n - 1))
else:
	print(t * 10 ** (n - 1))


(n, t) = list(map(int, input().split()))
number = 10 ** (n - 1)
status = 0
while number < 10 ** n:
	if number % t == 0:
		status = 1
		print(number)
		break
	number += 1
if status == 0:
	print(-1)


(n, d) = map(int, input().split())
p = pow(10, n - 1)
q = pow(10, n)
for i in range(p, q):
	if i % d == 0:
		k = i
		break
	if d >= q:
		k = -1
print(k)


(n, m) = [int(x) for x in input().split()]
a = '0' * n
if n * 10 > m:
	a = int(a.replace(a[0], str(1)))
	while a % m != 0:
		a += 1
	print(a)
else:
	print(-1)


(a, b) = map(int, input().split())
l = []
if b == 10 and a == 1:
	print(-1)
elif b == 10:
	l.append(1)
else:
	l.append(b)
z = 0
while z < a - 1:
	l.append(0)
	z += 1
h = 0
while h < len(l):
	print(l[h], end='')
	h += 1


(n, t) = [int(x) for x in input().split()]

def sum1(n, t):
	for j in range(10 ** (n - 1), 10 ** n):
		if j % t == 0:
			return j
	return '-1'
print(sum1(n, t))


import sys
inf = float('inf')
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, MOD) = (1000000007, 998244353)
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

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()
(n, t) = get_ints()
if t != 10:
	print(str(t) * n)
elif t == 10 and n == 1:
	print(-1)
elif t == 10 and n >= 2:
	n -= 2
	print('10' + n * '0')


t = input()
A = []
B = -1
for x in t.split():
	A.append(int(x))
for i in range(pow(10, A[0] - 1), pow(10, A[0])):
	if i % A[1] == 0:
		B = i
		break
print(B)


from itertools import product
from math import ceil
import string

def binary_table(string_with_all_characters, length_to_make):
	return [''.join(x) for x in product(string_with_all_characters, repeat=length_to_make)]

def all_possible_substrings(string):
	return [int(string[i:j]) for i in range(len(string)) for j in range(i + 1, len(string) + 1)]

def number_of_substrings(length):
	return int(length * (length + 1) / 2)

def is_prime(num):
	for i in range(2, num):
		if num / i == int(num / i) and num != i:
			return False
	return True
br = False
(num_of_digits, divisor) = map(int, input().split())
num = int(f"1{'0' * (num_of_digits - 1)}")
if len(str(num)) > num_of_digits:
	print(-1)
else:
	while num % divisor:
		num += 1
		if len(str(num)) > num_of_digits:
			print(-1)
			br = True
			break
	if not br:
		print(num)


(n, t) = map(int, input().split())
a = '1' * n
b = int(a) * t
if t == 10:
	c = str(b)[1:]
	if c != '0':
		print(c)
	else:
		print(-1)
elif len(str(b)) == n:
	print(b)
else:
	print(-1)


def main():
	(n, t) = [int(c) for c in input().split()]
	first = 10 ** n - 1
	while True:
		if first % t == 0:
			print(first)
			return
		elif t < first:
			first -= 1
		else:
			print(-1)
			break
main()


(n, t) = [int(x) for x in input().split()]
no = 10 ** (n - 1)
end = 10 ** n
f = 0
while no % t != 0:
	no += 1
	if no >= end:
		f = -1
		break
if f == -1:
	print(f)
else:
	print(no)


def Solve():
	(n, t) = map(int, input().split())
	if n == 1 and t == 10:
		print(-1)
	elif n > 1 and t == 10:
		print(str(1) + str(0) * (n - 1))
	else:
		print(str(t) * n)
Solve()


n = list(map(int, input().split()))
ini = 10 ** (n[0] - 1)
last = 10 ** n[0]
if n[0] == 1 and n[1] > 9:
	print('-1')
else:
	for i in range(ini, last):
		if i % n[1] == 0 and len(str(i)) == n[0]:
			print(i)
			break
	if i == last:
		print('-1')


inp = input()
(n, t) = map(int, inp.split(' '))
min = 1
if n != 1:
	for i in range(n - 1):
		min = min * 10
maxx = min * 10
found = False
res = -1
for i in range(min, maxx):
	if i % t == 0:
		found = True
		res = i
		break
	else:
		found = False
print(res)


def f(N, T):
	return str(T) + '0' * (N - 1)
(N, T) = (int(i) for i in input().split())
if T == 10:
	if N == 1:
		print(-1)
	else:
		print('1' + '0' * (N - 1))
else:
	print(f(N, T))


import math
from collections import defaultdict, Counter, deque
INF = float('inf')

def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a

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

def primeFactor(n):
	if n % 2 == 0:
		return 2
	i = 3
	while i ** 2 <= n:
		if n % i == 0:
			return i
		i += 1
	return n

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

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

def can(m, s):
	if 0 <= s <= m * 9:
		return True
	return False

def main():
	(m, n) = vars()
	num = int('9' * m)
	ans = num // n * n
	if n <= num and len(str(ans)) == m:
		print(ans)
	else:
		print(-1)
t = 1
for _ in range(t):
	main()


__author__ = 'yarsanich'
(n, t) = map(int, input().split())
s_min = '1'
for i in range(n - 1):
	s_min = s_min + '0'
s_max = ''
for i in range(n):
	s_max = s_max + '9'
ans = -1
for i in range(int(s_min), int(s_max)):
	if i % t == 0:
		ans = i
		break
if n == 1:
	for i in range(10):
		if i % t == 0:
			ans = i
if ans == 0:
	print(-1)
else:
	print(ans)


import math

def numDigits(num):
	return math.floor(math.log10(num)) + 1

def solve():
	(n, t) = [int(x) for x in input().split()]
	range_min = '1' + '0' * (n - 1)
	range_max = '9' * n
	for num in range(int(range_min), int(range_max) + 1):
		if numDigits(num) == n and num % t == 0:
			print(num)
			return
	print(-1)
	return
solve()


(a, b) = input().strip().split(' ')
(a, b) = [int(a), int(b)]
x = ''
if b == 10:
	if a == 1:
		x += '-1'
	else:
		for i in range(a - 1):
			x += '1'
		x += '0'
else:
	for i in range(a):
		x += str(b)
print(int(x))


(number, t) = map(int, input().split())
if t == 10:
	if 10 ** (number - 1) % 10 == 0:
		print(10 ** (number - 1))
	else:
		print(-1)
else:
	print(10 ** (number - 1) * t)


X = list(map(int, input().split()))
print(-1 if X[0] == 1 and X[1] == 10 else 10 ** (X[0] - 1) + X[1] - 10 ** (X[0] - 1) % X[1])


(n, t) = map(int, input().split())
a = 10 ** (n - 1) // t
b = int('9' * n) // t
if b == a:
	print(-1)
else:
	print((a + 1) * t)


import math
n = list(map(int, input().rstrip().split()))
strr1 = '0'
t = n[1]
flag = 0
for i in range(n[0] - 1):
	strr1 += '9'
strr = strr1 + '9'
num_up = int(strr)
num_low = int(strr1)
for i in range(num_low + 1, num_up + 1):
	if i % t == 0:
		print(i)
		flag = 1
		break
if flag == 0:
	print(-1)


import sys
(n, t) = map(int, input().split())
ans = pow(10, n - 1)
while ans % t != 0:
	ans += 1
if len(str(ans)) != n:
	print(-1)
else:
	print(ans)


temp = input()
(n, k) = temp.split()
n = int(n)
k = int(k)
for i in range(10 ** (n - 1), 10 ** n):
	if i % k == 0:
		print(i)
		exit()
print(-1)


def main():
	(n, t) = input().split()
	(n, t) = (int(n), int(t))
	base = 10 ** (n - 1)
	while base % t != 0:
		base += 1
		strBase = str(base)
		if len(strBase) > n:
			print(-1)
			return ()
	print(base)
	return ()
main()


(n, m) = input().split()
n = int(n)
m = int(m)
if m == 10:
	if n == 1:
		print(-1)
		exit()
	else:
		print('1', end='')
		for i in range(1, int(n)):
			print('0', end='')
else:
	for i in range(0, int(n)):
		print(m, end='')


(n, t) = [int(x) for x in input().split(' ')]

def solve(n, t):
	num = 10 ** (n - 1)
	while num % t != 0:
		num += 1
	if num == 10 ** n:
		return -1
	return num
print(solve(n, t))


(n, t) = map(int, input().split())
if 10 ** n - 1 < t:
	print(-1)
else:
	tmp = 10 ** (n - 1)
	print(tmp - tmp % t + t)


(n, t) = list(map(int, input().split()))
ans = '1'
ans += '0' * (n - 1)
ans = int(ans)
answer = -1
for i in range(9):
	if (ans + i) % t == 0:
		answer = ans + i
		break
print(answer)


(x, y) = list(map(int, input().split()))
c = ''
c = 10 ** (x - 1)
c = int(c)
if y == 0 or len(str(y)) > x:
	print(-1)
else:
	while c % y != 0:
		c = c + 1
	print(c)


(n, t) = map(int, input().split())
c = 0
num = 1
if n == 1 and t == 10:
	print('-1')
elif t < 10:
	c = n - 1
	while c != 0:
		num *= 10
		c -= 1
	print(num * t)
elif t == 10:
	c = n - 2
	while c != 0:
		num *= 10
		c -= 1
	print(num * t)


(n, t) = map(int, input().split())
n = int(n)
t = int(t)
start = 10 ** (n - 1)
stop = 10 ** n
flag = True
for i in range(start, stop):
	if i % t == 0:
		print(i)
		flag = False
		break
if flag:
	print(-1)


(n, t) = input().split()
s = 1
y = '9'
y *= int(n)
for x in range(int(n) - 1):
	s *= 10
possible = False
for i in range(int(s), int(y) + 1, 1):
	if i % int(t) == 0:
		print(i)
		possible = True
		break
if possible == False:
	print(-1)


input_str = input().split()
len = int(input_str[0])
denom = int(input_str[1])
num = 10 ** (len - 1)
maximum = 10 ** len - 1
while True:
	if num % denom == 0:
		print(num)
		break
	num += 1
	if num > maximum:
		print(-1)
		break


__author__ = 'ckboss'
(n, t) = map(int, input().split())
if t == 10:
	if n == 1:
		print(-1)
	else:
		print('1' + '0' * (n - 1))
else:
	print(str(t) + '0' * (n - 1))


(n, t) = map(int, input().split())
ans = 10 ** (n - 1 - (t > 9))
print([ans * t, -1][ans < 1])


(n, t) = list(map(int, input().split()))
if n < len(str(t)):
	print(-1)
elif t == 10:
	print('1' + (n - 1) * '0')
else:
	print(n * str(t))


s = input()
l = s.split()
l1 = int(l[0])
t = int(l[1])
p = 0
for i in range(pow(10, l1 - 1), pow(10, l1)):
	if i % t == 0:
		p = 1
		print(i)
		break
if p == 0:
	print(-1)


import random
(n, m) = [int(x) for x in input().split()]
z = []
cnt = 0
for i in range(n - 1):
	z.append(random.randint(1, 9))
x = ''
for i in z:
	x = x + str(i)
if len(z) == 0:
	for i in range(1, 10):
		if int(x + str(i)) % m == 0:
			print(x + str(i))
			cnt = 1
			break
else:
	for i in range(0, 10):
		if int(x + str(i)) % m == 0:
			print(x + str(i))
			cnt = 1
			break
if cnt == 0:
	print('-1')


string = '1'
substring = '1'
(n, t) = map(int, input().split())
for i in range(n):
	string += '0'
for i in range(n - 1):
	substring += '0'
value = 0
for i in range(int(substring), int(string)):
	if i % t == 0:
		value = i
		break
if value == 0:
	print(-1)
else:
	print(value)


import sys
(n, t) = [int(i) for i in input().split()]
if t < 10:
	print(n * str(t))
elif n == 1:
	print(-1)
else:
	print(1, '0' * (n - 1), sep='')


t = input()
(p, q) = (int(x) for x in t.split())
n = 10 ** (p - 1)
f = 0
if p == 1:
	if q == 10:
		print(-1)
		f = 1
if f == 0:
	for i in range(n, n + 32):
		if i % q == 0:
			print(i)
			break


def f(l):
	(n, t) = l
	m = 10 ** n - 1
	m -= m % t
	return m if m >= 10 ** (n - 1) else -1
l = list(map(int, input().split()))
print(f(l))


def findnumber(n, t):
	down = 10 ** (n - 1)
	up = 10 ** n
	for i in range(down, up):
		if i % t == 0:
			return i
	return -1
(n, t) = [int(x) for x in input().split(' ')]
print(findnumber(n, t))


def main():
	(n, t) = map(int, input().split())
	if n > 1:
		l = '1' + '0' * (n - 1)
		l = int(l)
		u = '9' + '9' * n
		u = int(u)
	else:
		l = 1
		u = 9
	flag = False
	for i in range(l, u + 1):
		if i % t == 0:
			print(i)
			flag = True
			break
	if not flag:
		print(-1)
main()


import time
(n, t) = (int(i) for i in input().split())
start = time.time()
min = 10 ** (n - 1)
max = 10 * min
if divmod(min, t)[1] == 0:
	ans = min
else:
	ans = min - divmod(min, t)[1] + t
if ans < max:
	print(ans)
else:
	print(-1)
finish = time.time()


is_debug = False
(n, t) = [int(x) for x in input().split()]
s = ''
if n < len(str(t)):
	s = '-1'
elif t < 10:
	for i in range(0, n):
		s = s + str(t)
else:
	s = '1'
	for i in range(0, n - 1):
		s = s + '0'
print(f'{s}')


(a, b) = map(str, input().split())
a = int('1' + '0' * (int(a) - 1))
b = int(b)
valor = -1
for i in range(a, a * 10):
	if i % b == 0:
		valor = i
		break
print(valor)


import math
l = list(map(int, input().split(' ')))
n = l[0]
t = l[1]
a = pow(10, n - 1)
b = pow(10, n)
total = 0
for i in range(a, b):
	if i % t == 0:
		total = 1
		print(i)
		break
if total != 1:
	print('-1')


def number(n, t):
	lim = t * 1
	if len(str(lim)) > n:
		return -1
	num = '1' + '0' * (n - 1)
	i = int(num)
	while True:
		if i % t == 0:
			return i
		i += 1
(n, t) = list(map(int, input().rstrip().split()))
print(number(n, t))


(n, t) = map(int, input().split())

def solve(n, t):
	x = 10 ** (n - 1)
	limit = 10 * x
	for i in range(t + 1):
		if x == limit:
			break
		if x % t == 0:
			return x
		x += 1
	return -1
print(solve(n, t))


(p, q) = map(int, input().split())
a = 10 ** (p - 1 - (q > 9))
print([q * a, -1][a < 1])


(n, k) = map(int, input().split())
if n == 1 and k == 10:
	print(-1)
	exit()
else:
	print(k, end='')
	for i in range(n):
		if k == 10:
			print((n - 2) * '0')
			exit()
		else:
			print((n - 1) * '0')
			exit()


a = input().split(' ')
n = int(a[0])
t = int(a[1])
s = '1' * n
e = '9' * n
s = int(s)
e = int(e)
flag = 0
for i in range(s, e + 1):
	if i % t == 0:
		flag = 1
		break
if flag == 1:
	print(i)
else:
	print(-1)


(n, t) = map(int, input().split())
if n == 1 and t == 10:
	print(-1)
else:
	if t == 10:
		temp = 2
	else:
		temp = 1
	print(t * 10 ** (n - temp))


import sys
s = sys.stdin.readline()
s = s.split(' ')
n = int(s[0])
t = int(s[1])
re = 10 ** n - 1 - (10 ** n - 1) % t
if re >= 10 ** (n - 1):
	print(re)
else:
	print(-1)


(n, t) = input().split(' ')
if t == '10':
	if n == '1':
		print(-1)
		exit()
	t = '1'
print(t + '0' * (int(n) - 1))


(n, t) = map(int, input().split())
if n == 1 and t == 10:
	print(-1)
	exit()
a = 10 ** (n - 1)
for q in range(1000):
	if (a + q) % t == 0:
		print(a + q)
		exit()


(n, t) = map(int, input().split())
i = pow(10, n - 1)
count = 0
while i < pow(10, n):
	if i % t == 0:
		print(i)
		break
	i = i + 1
if i == pow(10, n):
	print(-1)


(n, t) = map(int, input().split())
if n == 0:
	print(-1)
	exit()
else:
	a = int('9' * n)
	while a % t != 0:
		a -= 1
if a == 0:
	print(-1)
else:
	print(a)


def f():
	(n, m) = map(int, input().split())
	if n == 1 and m == 10:
		print('-1')
		return
	if m == 10:
		print(str(m) + '0' * (n - 2))
		return
	if n == 1:
		print(m)
		return
	print(str(m) + '0' * (n - 1))
f()


(n, t) = map(int, input().split())
if n == 1 and t < 10:
	print(t)
	exit(0)
(l, r) = (1, 10 ** n // t + 179)
while l < r - 1:
	mid = (l + r) // 2
	if len(str(t * mid)) < n:
		l = mid
	else:
		r = mid
if len(str(r * t)) != n:
	print(-1)
else:
	print(r * t)


import math
inp = input()
a = list(map(int, inp.split(' ')))
n = a[0]
t = a[1]
if n == 1 and t == 10:
	print(-1)
elif t == 10:
	print(10 ** (n - 1))
else:
	ans = 0
	i = 0
	while i != n:
		ans = ans + t * 10 ** i
		i += 1
	print(ans)


(n, t) = input().split()
a = int(n)
b = int(t)
if 10 ** a > b:
	while len(t) != a:
		t += '0'
else:
	t = '-1'
print(t)


(n, t) = input().split()
n = int(n)
t = int(t)
initial = 10 ** (n - 1)
if t >= 10 ** n:
	print(-1)
elif t >= initial:
	print(t)
else:
	while initial % t != 0:
		initial += 1
	print(initial)


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
mod = pow(10, 9) + 7
mod2 = 998244353

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

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

def outln(var):
	sys.stdout.write(str(var) + '\n')

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)]
(n, t) = sp()
if n == 1 and t == 10:
	out(-1)
	exit()
answer = ['1'] * n
answer[-1] = '0'
if n == 1:
	answer[-1] = '1'
for i in range(10):
	if int(''.join(answer)) % t == 0:
		out(''.join(answer))
		exit()
	answer[-1] = str(int(answer[-1]) + 1)


def trial():
	(n, t) = list(map(int, input().split()))
	mini = '1' + '0' * (n - 1)
	maxi = '9' * n
	for i in range(int(mini), int(maxi) + 1):
		if i % t == 0:
			return print(i)
	return print(-1)
trial()


(n, t) = [int(x) for x in input().strip().split(' ')]
target = 10 ** (n - 1)
while target < 10 ** n:
	if target % t == 0:
		print(target)
		break
	target += 1
if target == 10 ** n:
	print(-1)


(n, t) = map(int, input().split())
sum1 = t
maxx = 10 ** n - 1
if t <= maxx:
	for i in range(1, n, 1):
		sum1 += t * 10 ** i
	if t == 10:
		print(sum1 - 10 ** n)
	else:
		print(sum1)
else:
	print(-1)


def solutionA(n, t):
	counter = t
	size = len(str(t))
	if t > 10 ** n or size > n:
		return -1
	while size < n:
		counter *= 10
		size += 1
	return counter
(n, t) = input().split()
print(solutionA(int(n), int(t)))


(a, b) = map(int, input().split())
ans = 1
for i in range(a - 1):
	ans *= 10
while ans % b != 0:
	ans = ans + 1
if a == 1 and b == 10:
	print(-1)
else:
	print(ans)


n = input().split()
o = int(n[0])
r = n[1]
x = r
if len(r) > o:
	print(-1)
else:
	while len(x) < o:
		x = str(int(x) * 10)
	print(int(x))


(n, t) = map(int, input().split())
if t == 10 and n == 1:
	print(-1)
elif t == 10 and n > 1:
	print(10 ** (n - 1))
else:
	while n > 0:
		print(t, end='')
		n -= 1


(n, t) = map(int, input().split())
multi = max(10 ** (n - 1) // t, 1)
temp = 0
while multi > 0:
	if 10 ** n > multi * t >= 10 ** (n - 1):
		print(multi * t)
		temp = 1
		break
	if multi * t >= 10 ** n:
		break
	multi += 1
if temp == 0:
	print(-1)


(n, t) = map(int, input().split())
k = 10 ** (n - 1) // t
while k * t < 10 ** n:
	if k * t >= 10 ** (n - 1):
		print(k * t)
		break
	k += 1
else:
	print(-1)


(n, t) = map(int, input().split())
if t <= int('9' * n):
	print(int('9' * n) // t * t)
else:
	print(-1)


a = input().split()
x = int(a[0])
y = int(a[1])
d = pow(10, x - 1)
e = pow(10, x)
p = 0
while d < e:
	if d % y == 0:
		k = d
		p = 1
		break
	d = d + 1
if p == 1:
	print(k)
else:
	print('-1')


z = 0
m = 0
(a, b) = input().split()
a = int(a)
b = int(b)
x = 10 ** (a - 1)
y = 10 ** a
for o in range(x, y):
	if o % b == 0:
		z = o
		break
if z == 0:
	print(-1)
else:
	print(z)


(n, t) = map(int, input().split())
if t == 10 and n < 2:
	print(-1)
else:
	arr = ['1'] * n
	arr = ''.join(arr)
	if len(arr) > 1:
		arr = int(arr) - 1
	else:
		arr = int(arr)
	flag = 0
	while True:
		if arr % t == 0:
			flag = 1
			break
		arr += 1
	if flag:
		print(arr)
	else:
		print(-1)


(n, t) = map(int, input().split())
if t == 10 and n == 1:
	print('-1')
elif t == 10:
	s = ''
	for i in range(n - 1):
		s = s + '1'
	print(s + '0')
else:
	s = ''
	for i in range(n):
		s = s + chr(t + ord('0'))
	print(s)


(n, t) = [int(x) for x in input().split()]
k = 10 ** (n - 1)
l = 10 ** n
flag = 0
while k < l:
	if k % t == 0:
		flag = 1
		print(k)
		break
	k = k + 1
if flag == 0:
	print(-1)


(n, t) = list(map(int, input().split()))
res = -1
if n > 0 and t > 0:
	nMin = 10 ** (n - 1)
	nMax = 10 ** n - 1
	for val in range(nMin, nMax + 1):
		if val % t == 0:
			res = val
			break
print(res)


def main():
	arr = list(map(int, input().split(' ')))
	a = arr[0]
	b = arr[1]
	if b < 10:
		print(10 ** (a - 1) * b)
	elif b == 10 and a < 2:
		print(-1)
	else:
		print(10 ** (a - 1))
main()


line = input()
(n, t) = (int(line.split(' ')[0]), int(line.split(' ')[1]))
e = True
for i in range(10 ** (n - 1), 10 ** n):
	if i % t == 0:
		print(i)
		e = False
		break
if e:
	print(-1)


def f(n, t):
	x = 10 ** (n - 1)
	while x % t != 0:
		x += 1
	return x
(n, t) = map(int, input().split())
y = f(n, t)
if len(str(y)) == n:
	print(y)
else:
	print(-1)


(n, t) = input().split()
n = int(n)
n1 = n
s = 1
out = ''
if n >= len(t):
	while n > 0:
		out += t
		n -= len(t)
	if n != 0:
		out = out[:n]
		if int(out) % int(t) != 0:
			ou = int(out) - int(out) % int(t)
			print(ou)
	else:
		print(out)
else:
	print('-1')


(n, t) = [int(x) for x in input().split()]
if n == 1:
	print(-1 if t == 10 else t)
else:
	m = 10 ** (n - 1)
	for x in range(m, m + 15):
		if x % t == 0:
			print(x)
			break


(n, t) = map(int, input().split())
f = False
if n == 1 and t == 10:
	print(-1)
	f = True
ans = 10 ** (n - 1)
while ans % t != 0:
	ans += 1
if not f:
	print(ans)


import random

def static_size(n):
	start_range = 10 ** (n - 1)
	end_range = 10 ** n - 1
	return random.randint(start_range, end_range)
(n, t) = input().split()
(a, b) = (int(n), int(t))
k = static_size(a)
count = 0
v = 10 ** a - 1 - 10 ** (a - 1)
while count <= v + 13:
	if k % b == 0:
		print(k)
		exit(0)
	else:
		k = static_size(a)
	count += 1
print(-1)


(n, t) = map(int, input().split())
m = 10 ** (n - 1)
ma = 10 ** n - 1
flag = 0
for i in range(m, ma + 1):
	if i % t == 0:
		flag = 1
		print(i)
		break
if flag == 0:
	print(-1)


l1 = [int(x) for x in input().split()]
if l1[1] == 10 and l1[0] == 1:
	print(-1)
else:
	print(str(l1[1])[0] + '0' * (l1[0] - 1))


alpha = list(map(int, input().split()))
if alpha[1] == 10:
	ans = '1'
	ans += '0' * (alpha[0] - 1)
	if len(ans) < 2:
		ans = -1
	print(ans)
else:
	ans = '{}'.format(alpha[1]) * alpha[0]
	print(ans)


(n, t) = map(int, input().split())
(min_n, max_n, possible) = ('1', '1', False)
for i in range(1, n):
	min_n += '0'
	max_n += '1'
max_n = int(max_n) * 9
min_n = int(min_n)
for i in range(min_n, max_n + 1):
	if i % t == 0:
		print(i)
		possible = True
		break
if not possible:
	print(-1)


(a, b) = map(int, input().split())
if b == 2:
	ans = 10 ** a - 2
	print(ans)
elif b == 3 or b == 9:
	ans = 10 ** a - 1
	print(ans)
elif b == 4:
	if a == 1:
		ans = 10 - 6
		print(ans)
	else:
		ans = 10 ** a - 4
		print(ans)
elif b == 5:
	ans = 10 ** a - 5
	print(ans)
elif b == 6:
	ans = 10 ** a - 4
	print(ans)
elif b == 10:
	if a == 1:
		print(-1)
	else:
		ans = 10 ** (a - 1)
		print(ans)
elif b == 7 or b == 8:
	ans = b * 10 ** (a - 1)
	print(ans)


import math
(n, t) = map(int, input().split())
print([10 ** (n - 1) * t // math.gcd(10 ** (n - 1), t), -1][n == 1 and t == 10])


(n, t) = map(int, input().split())
i = 10 ** (n - 1)
c = 0
while i < 10 ** n:
	if i % t == 0:
		print(i)
		c += 1
		break
	i += 1
if c == 0:
	print(-1)


(n, t) = map(int, input().split())
low = 10 ** (n - 1)
high = 10 ** n
start = low // t + 1
for i in range(1, 3):
	if low <= i * t * start < high:
		print(i * t * start)
		exit()
print('-1')


(n, t) = map(int, input().split())
x = pow(10, n - 1)
y = pow(10, n)
for i in range(x, y):
	if i % t == 0:
		p = 0
		print(i)
		break
	else:
		p = 1
if p:
	print('-1')


(a, b) = tuple(input().split(' '))
a = int(a)
b = int(b)
if a is 1 and b is 10:
	print(-1)
	exit(0)
if b is 10:
	a -= 1
print(b * 10 ** (a - 1))


(n, m) = map(int, input().split())
if m == 10:
	if n == 1:
		print(-1)
	else:
		print('1' + '0' * (n - 1))
else:
	print(str(m) * n)


from typing import List

def parse_input() -> List[int]:
	return [int(x) for x in input().split()]

def solve(n: int, t: int) -> int:
	if n == 1 and t == 10:
		return -1
	elif t == 10:
		return 10 ** (n - 1)
	else:
		return int(str(t) * n)
(n, t) = parse_input()
print(solve(n, t))


(n, m) = map(int, input().split())
a = 10 ** (n - 1)
b = a % m
k = 0
if b == 0:
	k = a
	c = len(list(str(k)))
	if c == n:
		print(k)
	else:
		print(-1)
else:
	k = a + m - b
	c = len(list(str(k)))
	if c == n:
		print(k)
	else:
		print(-1)
if k == 0:
	print(-1)


(k, i) = map(int, input().split())
p = 0
l = 10 ** (k - 1)
while p == 0 and l < 10 ** k:
	if l % i == 0:
		p = 1
		print(l)
	l += 1
if p == 0:
	print(-1)


import random
(n, t) = map(int, input().split())
c = 1
while len(str(c)) < n:
	c *= 10
while c % t != 0:
	c += 1
print(c if c > 0 and len(str(c)) == n else -1)


s = input()
a = [int(i) for i in s.split()]
n = a[0]
t = a[1]
f = 0
for i in range(10 ** (n - 1), 10 ** n):
	if i % t == 0:
		print(i)
		f = 1
		break
if f == 0:
	print(-1)


mass = [int(x) for x in input().split()]
chislo = 10 ** (mass[0] - 1)
chislo1 = chislo
vivod = -1
while chislo != chislo1 * 10:
	if chislo % mass[1] == 0:
		vivod = chislo
		break
	chislo += 1
print(vivod)


(n, t) = [int(x) for x in input().strip().split()]
menor = 10 ** (n - 1)
mayor = 10 ** n
valido = False
for e in range(menor, min(menor + t, mayor)):
	if e % t == 0:
		valido = True
		print(e)
		break
if not valido:
	print(-1)


x = list(map(int, input().split()))
if x[0] == 1 and x[1] == 10:
	print(-1)
elif x[1] == 10:
	print(10 * 10 ** (x[0] - 2))
else:
	e = 1
	res = 0
	for i in range(x[0]):
		res += x[1] * e
		e *= 10
	print(res)


(n, t) = map(int, input().split())
if n > 1:
	if t != 10:
		print(int(''.join(['1'] * n)) * t)
	else:
		print(10 ** (n - 1))
if n == 1:
	for i in range(1, 5):
		if len(str(i * t)) == 1:
			print(i * t)
			break
		else:
			print(-1)
			break


found = False
(n, t) = input().split(' ')
n = int(n)
t = int(t)
for j in range(10 ** (n - 1), 10 ** n + 1):
	if 10 ** n == t:
		found = True
		print(-1)
		break
	num = j
	if num % t == 0 and (not found):
		print(num)
		found = True
		break
if not found:
	print(-1)


inp = list(map(int, input().split()))
n = inp[0]
t = inp[1]
if t == 10 and n == 1:
	print(-1)
elif t != 10:
	print(str(t) * n)
elif t == 10:
	print(pow(10, n - 1))


import math
(n, t) = map(int, input().split())
n = pow(10, n - 1)
l = len(str(n))
while True:
	if n % t == 0:
		print(n)
		break
	else:
		n += 1
	if len(str(n)) > l:
		print(-1)
		break


(n, t) = map(int, input().split())
p = int('1' + '0' * (n - 1))
q = p % t
if t > int('9' * n):
	print(-1)
else:
	print(p + t - q)


(a, b) = map(int, input().split())
if a == 1 and b == 10:
	print(-1)
elif b < 10:
	print(pow(10, a - 1) * b)
else:
	print(pow(10, a - 1))


(n, t) = map(int, input().split())
p = pow(10, n)
num = p - 1
if num >= t:
	r = num % t
	re = num - r
	d = pow(10, n - 1)
	if d > 1 and t > d:
		if re % d == 0:
			print(-1)
		else:
			print(re)
	else:
		print(re)
else:
	print(-1)


s = input().split()
n = s[0]
k = len(n)
n = int(n)
t = int(s[1])
i = 10 ** (n - 1)
fl = False
while i < 10 ** n:
	if i % t == 0:
		fl = True
		break
	i += 1
if fl == True:
	print(i)
else:
	print(-1)


(l, t) = map(int, input().split())
i = 10 ** (l - 1)
j = 10 ** l
result = False
for x in range(i, j):
	if x % t == 0:
		print(x)
		result = True
		break
if not result:
	print(-1)


def solve():
	(n, t) = map(int, input().split())
	start = 10 ** (n - 1)
	for i in range(max(start, 1), start + t + 1):
		if i % t == 0 and len(str(i)) == n:
			print(i)
			return
	print(-1)
solve()


import math
input_l = input().split(' ')
n = int(input_l[0])
t = int(input_l[1])
if n == 1 and t == 10:
	print(-1)
else:
	print('{}{}'.format(t, '0' * (n - 1 - t // 10)))


def main():
	(n, t) = list(map(int, input().split()))
	if t > 9 and n == 1:
		print(-1)
	elif t < 10:
		print(t * 10 ** (n - 1))
	else:
		print(t * 10 ** (n - 2))
main()


def get_num_digits(num):
	digit_count = 0
	while num != 0:
		num = num // 10
		digit_count += 1
	return digit_count

def main():
	(n, t) = map(int, input().split())
	cur_number = t
	while get_num_digits(cur_number) < n:
		cur_number *= t
	print(cur_number if get_num_digits(cur_number) == n else -1)
main()


(n, t) = [int(x) for x in input().split(' ')]
num = 10 ** (n - 1)
num2 = 10 ** n
passed = False
for i in range(num, num2):
	if i % t == 0:
		print(i)
		passed = True
		break
if not passed:
	print(-1)


def fx(a, b, c):
	if a >= 10 ** b:
		return print(-1)
	if a % c == 0:
		return print(a)
	return fx(a + 1, b, c)
(b, c) = input().split()
fx(10 ** (int(b) - 1), int(b), int(c))


(n, t) = map(int, input().split())
u = int('9' * n)
l = 10 ** (n - 1)
if u - u % t < l:
	print(-1)
else:
	print(u - u % t)


(n, t) = input().split()
a = 10 ** (int(n) - 1)
if a % int(t) != 0:
	res = (a // int(t) + 1) * int(t)
	if len(str(res)) > int(n):
		print(-1)
	else:
		print(res)
else:
	print(a)


(num_digits, divisible_by) = [int(a) for a in input().strip().split()]
given_num_digits = len(str(divisible_by))
if num_digits < given_num_digits:
	print(-1)
else:
	diff = num_digits - given_num_digits
	print(str(divisible_by) + '0' * diff)


(a, b) = map(int, input().split())
i = 10 ** (a - 1)
fl = bool(1)
while i <= 10 ** a - 1 and fl:
	if i % b == 0:
		print(i)
		fl = bool(0)
	i = i + 1
if fl:
	print(-1)


(n, k) = map(int, input().split())
h = 10 ** n
l = 10 ** (n - 1)
p = 0
z = 0
for i in range(l, h, 1):
	if i % k == 0:
		p = 1
		z = i
		break
	else:
		pass
if p == 1:
	print(z)
else:
	print(-1)


import random
a = input()
i = 0
m = ''
s = ''
while a[i] != ' ':
	m = m + a[i]
	i = i + 1
n = int(m)
i = i + 1
while i <= len(a) - 1:
	s = s + a[i]
	i = i + 1
t = int(s)
if n == 1 and t == 10:
	print('-1')
else:
	while True:
		x = random.randrange(pow(10, n - 1), pow(10, n))
		if x % t == 0:
			print(x)
			break


import math
line = input().split()
n = int(line[0])
t = int(line[1])
num = []
if n == 1 and t == 10:
	print(-1)
elif t == 10:
	for i in range(n - 1):
		num.append('1')
	num.append('0')
else:
	for i in range(n):
		num.append(f'{t}')
print(''.join(num))


string = input()
string = string.split()
n = int(string[0])
t = int(string[1])
if not 1 <= n <= 100 and (not 2 <= t <= 10):
	print(-1)
else:
	for i in range(10 ** (n - 1), 10 ** n, 1):
		if i % t == 0:
			print(i)
			break
	else:
		print(-1)


(n, t) = input().split(' ')
n = int(n)
t = int(t)
num = '9' * n
num = int(num)
if n == 1:
	small = 0
else:
	small = int('9' * (n - 1))
found = 0
while num > small and found == 0:
	if num % t == 0:
		print(num)
		found = 1
	num -= 1
if found == 0:
	print('-1')


import sys
(len, d) = map(int, sys.stdin.readline().split())
s = 1
while len > 1:
	s *= 10
	len -= 1
printed = False
for _i in range(9):
	if s % d == 0:
		print(s)
		printed = True
		break
	s += 1
if printed is False:
	print(-1)


(nx, tx) = input().split()
n = int(nx)
t = int(tx)
num = 10 ** (n - 1)
while num <= 10 ** (n - 1) + int('8' + (n - 1) * '8'):
	if num % t == 0:
		print(num)
		ans = '1'
		break
	else:
		num += 1
		ans = '0'
if ans == '0':
	print('-1')


def sol():
	(n, t) = map(int, input().split())
	s = ''
	if t == 10:
		if n == 1:
			s = '-1'
		else:
			for i in range(n - 1):
				s += str(1)
			s += str(0)
	else:
		for i in range(n):
			s += str(t)
	print(s)
sol()


l = list(map(int, input().split()))
(n, t) = (l[0], l[1])
s = int('1' + '0' * (n - 1))
if int(n * '9') < t:
	print(-1)
else:
	for i in range(0, t):
		s += 1
		if s % t == 0:
			print(s)
			break


(a, b) = map(int, input().rstrip().split(' '))
if a == 1 and b == 10:
	print(-1)
elif b == 10:
	print(10 ** (a - 1))
else:
	print(str(b) * a)


(n, t) = map(int, input().split(' '))
if n == 1 and t == 10:
	print(-1)
else:
	s = 10 ** (n - 1)
	end = 10 ** n
	while s < end:
		if s % t == 0:
			print(s)
			break
		else:
			s += 1


(n, t) = map(int, input().split())
s = 1
end = 9
f = 0
if n > 1:
	for i in range(1, n):
		s *= 10
		end = end * 10 + 9
for i in range(s, end + 1):
	if i % t == 0:
		print(i)
		f = 1
		break
if f == 0:
	print(-1)


(n, t) = map(int, input().split())
for number in range(10 ** (n - 1), 10 ** n):
	if number % t == 0:
		print(number)
		exit()
print(-1)


(n, t) = [int(a) for a in input().split()]
u = 0
for i in range(10 ** (n - 1), 10 ** n):
	if i % t == 0:
		print(i)
		u = u + 1
		break
if u == 0:
	print('-1')


(n, t) = list(map(int, input().split()))
x = 10 ** n - 1
if x < t:
	print(-1)
else:
	r = x % t
	if r != 0:
		x = x - r
	print(x)


a = list((int(x) for x in input().split()))
for i in range(10 ** (a[0] - 1), 10 ** a[0]):
	if i % a[1] == 0:
		print(i)
		break
	elif i == 10 ** a[0] - 1:
		print(-1)
	else:
		continue


import math

def main():
	(n, t) = map(int, input().split(' '))
	k = 10 ** (n - 1)
	m = 0
	while len(str(k)) <= n:
		if k % t == 0:
			print(k)
			m += 1
			break
		k += 1
	if m != 1:
		print(-1)
main()


def num_of_digits(x):
	c = 0
	while x >= 1:
		x = x / 10.0
		c += 1
	return c
(n, m) = map(int, input().split())
num = n * m
found = False
while not found and num_of_digits(num) <= n:
	if num_of_digits(num) == n:
		found = True
		print(num)
	else:
		num *= m
if num_of_digits(num) > n:
	print(-1)


(n, t) = map(int, input().split())
s = int('1' * n)
while len(str(s)) == n:
	if not s % t:
		print(s)
		break
	s += 1
else:
	print('-1')


(n, t) = map(int, input().split())
num1 = ['1'] + ['0'] * (n - 1)
num2 = ['9'] * n
num1 = int(''.join(num1))
num2 = int(''.join(num2))
k = 0
for i in range(num1, num2 + 1):
	if i % t == 0:
		print(i)
		break
	else:
		k += 1
if k == num2 - num1 + 1:
	print(-1)


import sys
(a, b) = map(int, input().split())
if a == 1 and b == 10:
	print(-1)
	sys.exit()
x = 10 ** a - 1
y = x % b
while y != 0:
	x = x - 1
	y = x % b
print(x)


def Rodion():
	(n, t) = list(map(int, input().split()))
	if n == 1:
		if t == 10:
			print(-1)
		else:
			print(t)
		return
	else:
		num = int('1' + '0' * (n - 1))
		for i in range(10):
			if num % t == 0:
				print(num)
				return
			else:
				num += 1
Rodion()


(n, t) = map(int, input().split())
ans = 10 ** (n - 1)
count = 0
while ans % t != 0:
	ans += 1
	count += 1
	if count > t:
		print(-1)
		exit()
if len(str(ans)) > n:
	print(-1)
else:
	print(ans)


(n, t) = map(int, input().split())
num = ''
for _ in range(0, n - len(str(t))):
	num += '0'
num = str(t) + num
if len(num) != n:
	print(-1)
else:
	print(num)


l = input().split(' ')
(n, t) = (int(l[0]), int(l[1]))
deb = '' + '1' + (n - 1) * '0'
fin = '' + n * '9'
for i in range(int(deb), int(fin) + 1):
	if i % t == 0:
		break
if i % t == 0:
	print(i)
else:
	print(-1)


(n, t) = map(int, input().split())
a = []
if t != 10:
	for i in range(n):
		a.append(t)
	ans = [str(k) for k in a]
	print(''.join(ans))
elif n != 1:
	a.append(1)
	for i in range(n - 1):
		a.append(0)
	ans = [str(k) for k in a]
	print(''.join(ans))
else:
	print(-1)


(n, t) = map(int, input().split())
k = 0
p = 1
if n == 1 and t == 10:
	print(-1)
else:
	while k < n - 1:
		k = k + 1
		p = 10 * p
	if t == 10:
		print(p)
	else:
		print(p * t)


(a, b) = map(int, input().split())
if len(str(b)) > a:
	print(-1)
elif len(str(b)) == a:
	print(b)
else:
	number = int('1' + (a - 1) * str(0))
	for i in range(1, b + 1):
		if number % b == 0:
			print(number)
			break
		else:
			number += 1


import math
(n, t) = map(int, input().split())
strAcc = '2'
for i in range(n - 1):
	strAcc += '0'
num = int(strAcc) / float(t)
resp = int(math.ceil(num)) * t
if len(str(resp)) != n:
	print(-1)
else:
	print(resp)


(n, t) = map(int, input().strip().split())
minnum = int('1' + '0' * (n - 1))
maxnum = int('1' + '0' * n)
ok = 1
while minnum < maxnum:
	if minnum % t == 0:
		ok = 0
		break
	minnum += 1
if not ok:
	print(minnum)
else:
	print(-1)


invalues = list(map(int, input().split()))
p = 10 ** invalues[0] % invalues[1]
if invalues[0] == 1 and invalues[1] == 10:
	print(-1)
elif p == 0:
	print(10 ** invalues[0] - invalues[1])
else:
	print(10 ** invalues[0] - p)


import random
import math
(n, t) = list(map(int, input().split()))
ans = ''
if t == 10 and n == 1:
	print(-1)
elif t != 10 and n == 1:
	print(t)
else:
	if t == 10:
		n = n - 2
	if t != 10:
		n = n - 1
	ans += '{}'.format(t)
	for i in range(n):
		ans += '{}'.format(0)
	print(ans)


l = [int(x) for x in input().split()]
s = l[0]
n = l[1]
x = 10 ** (s - 1)
y = 10 ** s - 1
flag = 0
for i in range(x, y + 1):
	if i % n == 0:
		print(i)
		flag = 1
		break
if flag == 0:
	print('-1')


(n, t) = [int(x) for x in input().split()]
l = 10 ** n
x = 10 ** (n - 1)
c = [-1]
for i in range(x, l):
	if i % t == 0:
		c.append(i)
		break
if len(c) == 1:
	print(-1)
else:
	print(c[1])


(n, t) = map(int, input().split())
start = '1' + '0' * (n - 1)
end = '9' * n
start = int(start)
end = int(end)
ans = -1
for i in range(start, end + 1):
	if i % t == 0:
		ans = i
		break
print(ans)


l = list(map(int, input().strip().split()))
n = l[0]
t = l[1]
if t == 10:
	if n == 1:
		print(-1)
	else:
		print(1, end='')
		for i in range(0, n - 1):
			print(0, end='')
else:
	for i in range(0, n):
		print(t, end='')


import math
(n, t) = list(map(int, input().split()))
log = int(math.log(t, 10))
if log >= n:
	print(-1)
else:
	print(10 ** (n - log - 1) * t)


(n, t) = map(int, input().split())
s = 1
while True:
	s = s * t
	if len(str(s)) == n:
		print(s)
		break
	elif len(str(s)) > n:
		print(-1)
		break


(n, t) = map(int, input().split())
c = n + 1
a = 10 ** (n - 1)
b = 10 ** (c - 1)
for j in range(a, b):
	if a % t == 0:
		print(a)
		break
	a += 1
else:
	print(-1)


def main():
	(n, t) = map(int, input().split())
	if n == 1 and t == 10:
		print(-1)
		return
	if t == 10:
		print(10, end='')
		for i in range(n - 2):
			print(0, end='')
		return
	for i in range(n):
		print(t, end='')
main()


def findDivisible(len, div):
	if len == 1:
		if div not in list(range(10)):
			return -1
	numLen = '1'
	startNum = 1
	num = 0
	for i in range(1, len):
		numLen += '0'
	numLen = int(numLen)
	while numLen < numLen * 10:
		if int(numLen) % int(div) == 0:
			return numLen
		numLen += 1
	return -1
items = input().split()
print(findDivisible(int(items[0]), int(items[1])))


import itertools as it
import functools
import operator
import collections
import math
import sys

def solve(n, t):
	count = (10 ** n - 1) // t - (10 ** (n - 1) - 1) // t
	if count == 0:
		return -1
	else:
		return (10 ** n - 1) // t * t

def p(*args, **kwargs):
	return print(*args, file=sys.stderr, **kwargs)

def main():
	[n, t] = [int(c) for c in input().strip().split()]
	result = solve(n, t)
	print(result)
main()


(n, t) = map(int, input().split())
r = pow(10, n) - 1
l = pow(10, n - 1)
flag = 0
ans = 0
for i in range(l, r + 1):
	if i % t == 0:
		ans = i
		flag = 1
		break
if flag == 1:
	print(ans)
else:
	print(-1)


(n, t) = map(int, input().split())
if n == 1 and t == 10:
	exit(print(-1))
x = 1 if t == 10 else t
print(''.join([str(x)] + ['0'] * (n - 1)))


def main():
	from sys import stdin, stdout
	(n, t) = map(int, stdin.readline().split())
	for i in range(10 ** (n - 1), 10 ** n):
		if i % t == 0:
			stdout.write(str(i))
			return
	stdout.write('-1')
main()


(n, t) = map(int, input().split())
if t == 10:
	ans = int(t) * 10 ** (int(n) - 2)
	if len(str(ans)) == int(n):
		print(ans)
	else:
		print('-1')
else:
	ans = int(t) * 10 ** (int(n) - 1)
	if len(str(ans)) == int(n):
		print(ans)
	else:
		print('-1')


(n, t) = [int(i) for i in input().split()]
a = 10 ** n - 1
while a % t != 0 and a >= 10 ** (n - 1):
	a = a - 1
if a < 10 ** (n - 1):
	print(-1)
else:
	print(a)


(n, k) = list(map(int, input().split()))
if k == 10 and n == 1:
	print(-1)
elif k == 10:
	print('1' + '0' * (n - 1))
else:
	print(str(k) * n)


from random import randint
(n, t) = map(int, input().split())
x = 0
if n == 1 and t > 9:
	x = -1
else:
	while x == 0 or x % t != 0:
		x = 0
		for i in range(n - 1, 0, -1):
			x += randint(1, 9) * 10 ** i
		x += randint(0, 9)
print(x)


nt = input().split()
n = int(nt[0])
t = int(nt[1])
if n == 1 and t == 10:
	print(-1)
else:
	poweroften = 10 ** (n - 1)
	if poweroften % t != 0:
		poweroften += t - poweroften % t
	print(poweroften)


(n, m) = map(int, input().split())
a = -1
num = pow(10, n - 1)
while len(str(num)) == n:
	if num % m == 0:
		a = num
		break
	num += 1
print(a)


import sys
n = [int(x) for x in sys.stdin.readline().split()]
t = n[1]
n = n[0]
while len(str(t)) < n:
	t *= 10
print(t if len(str(t)) == n else -1)


(n, t) = input().split()
n = int(n)
t = int(t)
number_min = '1'
number_max = '10'
for i in range(0, n - 1, 1):
	number_min = number_min + '0'
	number_max = number_max + '0'
number_min = int(number_min)
number_max = int(number_max) - 1
result = -1
for i in range(number_min, number_max + 1, 1):
	if i % t == 0:
		result = i
		break
print(result)


from math import sqrt
from random import randint

def ip(n):
	if n == 1:
		return False
	for i in range(2, int(sqrt(n)) + 1):
		if n % i == 0:
			return False
	return True

def s2(n):
	a = list(range(n))
	a[1] = 0
	for i in a:
		if i > 1:
			for j in range(i * 2, len(a), i):
				a[j] = 0
	return {i ** 2 for i in a}
v = input().split()
n = int(v[0])
t = int(v[1])
if t == 10 and n == 1:
	print(-1)
elif t == 10:
	print(t * 10 ** (n - 2))
else:
	print(t * 10 ** (n - 1))


import itertools as ittls
from collections import Counter
from functools import reduce
import string

def sqr(x):
	return x * x

def inputarray(func=int):
	return map(func, input().split())
(n, t) = inputarray()
if t == 10:
	if n == 1:
		print(-1)
	else:
		print('1' + '0' * (n - 1))
	quit()
print(str(t) * n)


(n, t) = [int(x) for x in input().split(' ')]
if n == 1 and t == 10:
	print('-1')
else:
	c = 10 ** (n - 1)
	while True:
		if c % t == 0:
			print(c)
			break
		else:
			c += 1


(n, t) = map(int, input().split())
s = int('1' + ''.join(['0' for _ in range(n - 1)]))
if s % t == 0:
	print(s)
elif (s // t + 1) * t < s * 10:
	print((s // t + 1) * t)
else:
	print(-1)


(x, y) = input().split()
x = int(x)
if len(y) == 1:
	if len(y) <= x:
		print(x * y)
	else:
		print(-1)
elif len(y) <= x:
	print(x % len(y) * '1' + y * (x // len(y)))
else:
	print(-1)


(n, t) = map(int, input().split())
q = str(t)
w = '0'
if n == 1 and t == 10:
	print(-1)
	exit(0)
if n == 1:
	print(q)
	exit(0)
if n == 2 and t == 10:
	print(t)
	exit(0)
if n > 1 and t == 10:
	for i in range(0, n - 3):
		w = w + '0'
	q = q + w
	print(q)
	exit(0)
else:
	for i in range(1, n - 1):
		w = w + '0'
q = q + w
print(q)


def f(n, t):
	if n == 1:
		if t == 10:
			print(-1)
		else:
			print(t)
	else:
		print(t, end='')
		for i in range(n - 1 - t // 10):
			print(0, end='')
	print()
(n, t) = map(int, input().split())
f(n, t)


import sys
import time
import os
from math import sqrt, log, log2, log10, gcd, floor, pow, sin, cos, tan, pi, inf, factorial
from copy import copy, deepcopy
from sys import exit, stdin, stdout
from collections import Counter, defaultdict, deque
from itertools import permutations
import heapq
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
mod = 1000000007
iinp = lambda : int(sys.stdin.readline())
inp = lambda : sys.stdin.readline().strip()
strl = lambda : list(inp().strip().split(' '))
intl = lambda : list(map(int, inp().split(' ')))
mint = lambda : map(int, inp().split())
flol = lambda : list(map(float, inp().split(' ')))
flush = lambda : stdout.flush()

def permute(nums):

	def fun(arr, nums, cur, v):
		if len(cur) == len(nums):
			arr.append(cur.copy())
		i = 0
		while i < len(nums):
			if v[i]:
				i += 1
				continue
			else:
				cur.append(nums[i])
				v[i] = 1
				fun(arr, nums, cur, v)
				cur.pop()
				v[i] = 0
				i += 1
		return arr
	res = []
	nums.sort()
	v = [0] * len(nums)
	return fun(res, nums, [], v)

def subsets(res, index, arr, cur):
	res.append(cur.copy())
	for i in range(index, len(arr)):
		cur.append(arr[i])
		subsets(res, i + 1, arr, cur)
		cur.pop()
	return res

def sieve(N):
	root = int(sqrt(N))
	primes = [1] * (N + 1)
	(primes[0], primes[1]) = (0, 0)
	for i in range(2, root + 1):
		if primes[i]:
			for j in range(i * i, N + 1, i):
				primes[j] = 0
	return primes

def bs(arr, l, r, x):
	if x < arr[0] or x > arr[len(arr) - 1]:
		return -1
	while l <= r:
		mid = l + (r - l) // 2
		if arr[mid] == x:
			return mid
		elif arr[mid] < x:
			l = mid + 1
		else:
			r = mid - 1
	return -1

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	p = int(sqrt(n))
	for i in range(5, p + 1, 6):
		if n % i == 0 or n % (i + 2) == 0:
			return False
	return True

def solve():
	(n, t) = mint()
	if len(str(t)) > n:
		print(-1)
		return
	if t == 10:
		s = '1' * (n - 1)
		s += '0'
		print(s)
		return
	print(str(t) * n)
start_time = time.time()
solve()


(n, t) = [int(x) for x in input().split()]
res = pow(10, n - 1)
if res % t == 0:
	print(res)
	quit()
x = (res // t + 1) * t
c = 0
ans = x
while x:
	x //= 10
	c += 1
if c == n:
	print(ans)
else:
	print(-1)


import sys
s = [int(i) for i in input().split()]
(n, t) = (s[0], s[1])
a = 10 ** (n - 1)
b = 10 ** (n - 1) * 10
if a == 0:
	a = 1
for i in range(a, b):
	if i % t == 0:
		print(i)
		sys.exit()
print(-1)


import random, math
n = [int(x) for x in input().split()]
if 10 ** n[0] - 1 < n[1]:
	print(-1)
	exit(0)
x = random.randint(10 ** (n[0] - 1), 10 ** n[0] - 1)
if x % n[1] != 0:
	x1 = x // n[1] * n[1]
	x2 = math.ceil(x / n[1]) * n[1]
print(x if x % n[1] == 0 else x1 if x1 >= 10 ** (n[0] - 1) and x1 <= 10 ** n[0] else x2)


import math
(a, b) = map(int, input().split())
n = '1'
for i in range(a - 1):
	n += '0'
d = len(n) - len(str(b))
num = '1'
for i in range(d):
	num += '0'
c = b * int(num)
if int(d) < 0:
	print(-1)
elif int(d) == 0:
	print(b)
else:
	print(c)


from sys import stdin, stdout
input = stdin.readline
(n, t) = map(int, input().split())
if n == 1 and t == 10:
	stdout.write('-1')
elif t == 10:
	stdout.write('1' + '0' * (n - 1))
else:
	stdout.write(str(t) * n)


from math import log10, floor
(d, a) = map(int, input().split())
da = floor(log10(a)) + 1
if d < da:
	print(-1)
else:
	ans = a * 10 ** (d - da)
	print(ans)


(x, y) = map(int, input().split())
if len(str(y)) <= x:
	i = 0
	while len(str(y * 10 ** i)) != x:
		i += 1
	print(y * 10 ** i)
else:
	print(-1)


min_n = 5040
(x, y) = map(int, input().split())
if x >= 4:
	print('5040' + '0' * (x - 4))
else:
	status = False
	start = int('1' + '0' * (x - 1))
	for i in range(start, int('1' + '0' * x)):
		if i % y == 0:
			print(i)
			status = True
			break
	if status == False:
		print(-1)


(n, m) = [int(x) for x in input().split()]
num = 0
if n == 1:
	if m < 10:
		print(m)
	else:
		print(-1)
else:
	for i in range(10 ** (n - 1), 10 ** n):
		if i % m == 0:
			print(i)
			break
		else:
			num = num + 1
	if num == 10 ** n - 10 ** (n - 1):
		print(-1)


(n, t) = [int(k) for k in input().split(' ')]
if n == 1:
	if t == 10:
		print(-1)
	else:
		print(t)
else:
	print(10 ** (n - 1) + t - 10 ** (n - 1) % t)


from collections import defaultdict

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

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

def pt(x):
	print(x)

def ip():
	return input()

def it():
	return int(input())

def sl(x):
	return [t for t in x]

def spl(x):
	return x.split()

def aj(liste, item):
	liste.append(item)

def bin(x):
	return '{0:b}'.format(x)

def printlist(l):
	print(' '.join([str(x) for x in l]))

def listring(l):
	return ''.join([str(x) for x in l])
(n, t) = mp()
if t < 10:
	print(str(t) * n)
elif n > 1:
	print('1' + '0' * (n - 1))
else:
	print(-1)


def main():
	(n, t) = [int(i) for i in input().split()]
	if n == 1 and t == 10:
		print(-1)
	else:
		x = t
		while len(str(x)) < n:
			x *= t
		print(x)
main()


emon = input().split()
a = int(emon[0])
b = int(emon[1])
num = 1
for i in range(a):
	num = num * 10
h = 0
for i in range(num // 10 + 1, num):
	if i % b == 0:
		h += 1
		print(i)
		break
if h == 0:
	print('-1')


import sys
import os

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

def get_array():
	return list(map(int, input().split()))
if os.environ.get('DEBUGSTER_PYTHON'):
	sys.stdin = open('in.txt', 'r')
	sys.stdout = open('out.txt', 'w')
(n, t) = get_int()
if n == 1 and t == 10:
	print(-1)
elif t < 10:
	for _ in range(n):
		print(t, end='')
else:
	print(1, end='')
	for _ in range(n - 1):
		print(0, end='')


L = input()
L = L.split()
n = int(L[0])
t = int(L[1])
A = len(str(t))
if n >= A:
	Base = 10 ** (n - 1)
	N = Base
	while N % t != 0:
		N += 1
	print(N)
else:
	print(-1)


p = input().split()
p = list(map(int, p))
n = p[0]
t = p[1]
u = 10 ** n - 1
l = 10 ** (n - 1)
i = l
cc = 0
while i <= u and cc == 0:
	if i % t == 0:
		print(i)
		cc = 1
	else:
		i = i + 1
if cc == 0:
	print(-1)


def main():
	flag = 1
	(n, t) = map(int, input().split())
	i = 10 ** (n - 1)
	if n == 1 and t == 10:
		flag = 0
		print(-1)
	while flag == 1:
		if i % t == 0:
			flag = 0
			print(i)
		i += 1
main()


(a, b) = map(int, input().split())
s = 0
i = 10 ** (a - 1)
while i < 10 ** a:
	if i % b == 0:
		s += 1
		break
	i += 1
if s == 1:
	print(i)
else:
	print(-1)


(n, t) = map(int, input().split())
c = 10 ** (n - 1)
d = 10 ** n
a = -1
for i in range(c, d):
	if i % t == 0:
		a = i
		break
print(a)


found = 1
(n, k) = map(int, input().split())
if n == 1:
	if k <= 9:
		print(k)
	else:
		print(-1)
	found = 0
else:
	s = 1
	for i in range(n - 1):
		s = s * 10 + 0
	for i in range(s + 1, s + 100, 1):
		if i % k == 0:
			print(i)
			found = 0
			break
	if found == 1:
		print(-1)


from sys import stdin, stdout, maxsize
tup = lambda : map(int, stdin.readline().split())
I = lambda : int(stdin.readline())
lint = lambda : [int(x) for x in stdin.readline().split()]
stpr = lambda x: stdout.write(f'{x}' + '\n')
from _collections import defaultdict
(n, t) = tup()
x = str(t * (n * pow(10, n)))
print(x[:n]) if len(x[:n]) == n and int(x[:n]) % t == 0 else print(-1)


import math
inp = input()
(n, t) = inp.split()
n = int(n)
t = int(t)
if n == 1 and t == 10:
	print(-1)
elif t == 10:
	print(10 ** (n - 1))
else:
	for i in range(n):
		print(t, end='')


(n, t) = map(int, input().split())
length = len(str(t))
square = n - length
if square >= 0:
	ans = t * 10 ** square
else:
	ans = '-1'
print(ans)


__author__ = 'ploskov'

def main():
	(n, t) = map(int, input().split())
	number = int('1' + '0' * (n - 1))
	while number % t:
		number += 1
	if len(str(number)) > n:
		print(-1)
	else:
		print(number)
main()


(n, t) = [int(i) for i in input().split()]
k = 10 ** (n - 1)
x = k % t
k = k + (t - x)
s = str(k)
if len(s) == n:
	print(s)
else:
	print(-1)


(n, t) = list(map(int, input().split()))
if len(str(t)) == 1:
	num = str(t) * n
else:
	o = len(str(t)) - 1
	h = n - o
	num = str(t)[0] * h + str(t)[1:]
if len(num) == n and int(num) % t == 0 and (int(num) != 0):
	print(int(num))
else:
	print(-1)


nt = [int(i) for i in input().split()]
n = nt[0]
t = nt[1]
number = []
if n == 1:
	if t == 10:
		print(-1)
	else:
		print(t)
if n >= 2:
	number.append('1')
	for i in range(n - 2):
		number.append('0')
	for i in range(10):
		if int(''.join(number) + str(i)) % t == 0:
			print(''.join(number) + str(i))
			break


(n, t) = map(int, input().split())
start = 10 ** (n - 1)
end = 10 ** n - 1
ans = -1
i = start
while i <= end:
	if i % t == 0:
		ans = i
		break
	i += 1
print(ans)


import math as m
(a, b) = input().split()
a = int(a)
b = int(b)
if b == 10 and a == 1:
	print(-1)
elif b == 10 and a == 2:
	print(10)
else:
	mul = 1
	for x in range(0, a - 1):
		mul *= 10
	if b != 10:
		print(b * mul)
	else:
		print(mul)


(n, t) = list(map(int, input().split()))

def result(t, n):
	M = pow(10, n) - 1
	return M - M % t
if result(t, n) > 0:
	print(result(t, n))
else:
	print('-1')


(n, t) = input().split()
(n, t) = (int(n), int(t))
ls = list()
ls.append(t)
if n == 1 and t > 9:
	print(-1)
else:
	while len(ls) < n:
		ls += '0'
	if t >= 10:
		del ls[-1]
	for i in ls:
		print(i, end='')
print()


(a, b) = map(int, input().split())
if a == 1 and b == 10:
	print('-1')
elif b == 10:
	print('3' * (a - 1) + '0')
else:
	print(str(b) * a)


(n, t) = map(int, input().split())
if len(str(t)) > n:
	print(-1)
elif t in range(2, 10):
	print(t * 10 ** (n - 1))
elif t == 10:
	print(t * 10 ** (n - 2))


(n, t) = map(int, input().split(' '))
strt = int('1' + (n - 1) * '0')
stop = int(str(strt) + '0')
for i in range(strt, stop):
	if i % t == 0:
		print(i)
		break
else:
	print(-1)


(n, d) = map(int, input().rstrip().split())
if len(str(d) + '0' * (n - len(str(d)))) > n:
	print(-1)
elif len('1' + '0' * (n - 1)) == 1 and d == 10:
	print(-1)
else:
	print([str(d) + '0' * (n - 1), '1' + '0' * (n - 1)][0 if d != 10 else 1])


(n, t) = map(int, input().split())
num = int(str(1) + str(0) * (n - 1))
final = int(str(9) + str(9) * (n - 1))
x = 0
while num <= final:
	if num % t == 0:
		print(num)
		x = 1
		break
	num += 1
if x == 0:
	print(-1)


(a, b) = input().split()
a = int(a)
b = int(b)
for i in range(10 ** (a - 1), 10 ** a):
	if i % b == 0:
		print(i)
		exit(0)
else:
	print('-1')


inp = input().split()
n = int(inp[0])
t = int(inp[1])
x = str(t)
if n == 1 and t == 10:
	print(-1)
else:
	for i in range(n - len(x)):
		x += str(0)
	print(int(x))


(n, t) = map(int, input().split())
ch = '1'
ch += '0' * (n - 1)
p = int(ch)
flag = 0
while p % t != 0:
	if len(str(p + 1)) == n:
		p += 1
	else:
		flag = 1
		break
if not flag:
	print(p)
else:
	print(-1)


x = input()
x = x.split(' ')
n = int(x[0])
t = int(x[1])
b = 1
for i in range(2, n + 1):
	b = b * 10
flag = 0
for i in range(0, 10):
	if n == 1 and b == 10:
		break
	if b % t == 0:
		flag = 1
		break
	b = b + 1
if flag:
	print(b)
else:
	print(-1)


(n, t) = map(int, input().split())
cur = t
if len(str(cur)) > n:
	print(-1)
	exit(0)
pw = 2 ** 400
while pw:
	if len(str(pw * cur)) <= n:
		cur *= pw
	pw >>= 1
print(cur)


a = [int(x) for x in input().split()]
if a[1] >= 10 ** a[0]:
	print(-1)
elif a[1] >= 10 ** (a[0] - 1):
	print(a[1])
else:
	x = 10 ** (a[0] - 1)
	while x < 10 ** a[0]:
		if x % a[1] == 0:
			print(x)
			break
		x += 1


(n, t) = map(int, input().split())
v = t
while True:
	l = len(str(v))
	if l > n:
		print('-1')
		break
	if l == n:
		print(v)
		break
	v *= t


(n, t) = map(int, input().split())
r = 10 ** n - 1
b = 10 ** (n - 1)
s = 0
for i in range(b, r + 1, 1):
	if i % t == 0:
		print(i)
		s = 1
		break
if s == 0:
	print(-1)


from __future__ import division, print_function
from collections import *
from math import *
from itertools import *
from time import time
import os
import 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 main():
	(n, t) = map(int, input().split())
	length = len(str(t))
	if length > n:
		print(-1)
		return
	zeros = n - length
	print(f'{t}' + '0' * zeros)
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()


(n, t) = input().split()
n = int(n)
t = int(t)
n = 10 ** (n - 1)
for i in range(n, n + t):
	if len(str(i)) > len(str(n)):
		print(-1)
		break
	if i % t == 0:
		print(i)
		break


lst = list(map(int, input().split()))
f = 1
l = 9
i = 1
while i < lst[0]:
	i = i + 1
	f = f * 10
	l = l * 10 + 9
k = 0
i = f
while i <= l:
	if i % lst[1] == 0:
		k = 1
		print(i)
		break
	i = i + 1
if k == 0:
	print('-1')


s = [int(n) for n in input().split()]
if s[1] < 10:
	print(s[1] * 10 ** (s[0] - 1))
elif s[0] == 1:
	print(-1)
else:
	print(10 ** (s[0] - 1))


(n, t) = map(int, input().split(' '))
tens = int('1' + (n - 1) * '0')
if n == 1 and t in range(10):
	print(t)
elif t > tens:
	print(-1)
else:
	print(tens + (t - tens % t))


(n, t) = map(int, input().split())
s = 1
if n > 1:
	for i in range(n - 1):
		s = s * 10
y = s * 10
v = False
while s < y:
	if s % t == 0:
		print(s)
		v = True
		break
	s = s + 1
if v == False:
	print(-1)


(a, b) = input().split()
k = len(b)
(a, b) = (int(a), int(b))
if k > a:
	print(-1)
else:
	if k == 1:
		print(b * 10 ** (a - 1))
	if k > 1:
		print(b * 10 ** (a - 2))


(n, t) = map(int, input().split())
if t < 10:
	num = int('1' * n) * t
	print(num)
elif n != 1 or t != 10:
	num = 10 ** (n - 1)
	print(num)
else:
	print(-1)


a = map(int, input().split())
(b, c) = a
i = 10 ** (b - 1)
f = []
while i in range(10 ** (b - 1), 10 ** (b - 1) + 9):
	if i % c == 0:
		f.append(i)
	i += 1
w = len(f)
if w == 0:
	print('-1')
else:
	print(f[0])


(n, t) = [int(x) for x in input().split()]
min_num = 10 ** (n - 1)
max_num = 10 ** n
res = -1
for num in range(min_num, max_num):
	if num % t == 0:
		res = num
		break
print(res)


s = input().split()
n = int(s[0])
k = int(s[1])
if k == 10:
	if n > 1:
		a1 = [1]
		a2 = [0 for i in range(n - 1)]
		a = a1 + a2
		print(''.join((str(i) for i in a)), end='')
	else:
		print(-1)
else:
	for i in range(n):
		print(k, end='')


__author__ = 'artyom'

def main():
	(n, t) = read(3)
	if t == 10:
		if n == 1:
			return -1
		return '1' * (n - 1) + '0'
	return str(t) * n

def read(mode=2, size=None):
	if mode == 0:
		return input().strip()
	if mode == 1:
		return input().strip().split()
	if mode == 2:
		return int(input().strip())
	if mode == 3:
		return list(map(int, input().strip().split()))
	a = []
	for _ in range(size):
		a.append(read(3))
	return a

def write(s='\n'):
	if s is None:
		s = ''
	if isinstance(s, tuple) or isinstance(s, list):
		s = ' '.join(map(str, s))
	s = str(s)
	print(s, end='\n')
res = main()
write(res)


(m, n) = map(int, input().split())
m1 = str(m)
n1 = str(n)
if m == 1 and len(n1) >= 2:
	print('-1')
else:
	k = 10 ** (m - 1)
	while k >= 10 ** (m - 1):
		if k % n == 0:
			print(k)
			break
		else:
			k = k + 1


(x, y) = map(int, input().split())
if x == 1 and y == 10:
	print('-1')
	exit(0)
print(y, end='')
if y < 10:
	for i in range(x - 1):
		print(0, end='')
else:
	for i in range(x - 2):
		print(0, end='')


(n, t) = [int(x) for x in input().split(' ')]
a = True
for i in range(10 ** (n - 1), 10 ** n):
	if i % t == 0:
		a = False
		print(i)
		break
if a:
	print(-1)


(n, t) = map(int, input().split())
ans = 0
if t < 10:
	ans = n * str(t)
elif t == 10 and n != 1:
	ans = (n - 1) * str(1) + str(0)
elif t == 10 and n == 1:
	ans = -1
print(ans)


import math
from collections import Counter

def get(f):
	return map(f, input().split())

def divides(a, b):
	return a % b == 0

def main():
	(n, t) = get(int)
	if t == 10:
		if n == 1:
			print(-1)
			return
		t = 1
	print(str(t) + '0' * (n - 1))
main()


arr = list(map(int, input().split()))
n = arr[0]
t = arr[1]
if t == 10:
	if n == 1:
		print(-1)
	else:
		print('1' * (n - 1) + '0')
else:
	print(f'{t}' * n)


(n, t) = map(int, input().split())
mid = n - 2
if t != 0 and t != 10:
	print(str(t) * n, sep='')
elif t == 10 and len(str(t)) <= n:
	print(str(1) * int(mid), 10, sep='')
else:
	print(-1)


(n, t) = map(int, input().split())
l = []
r = 10 ** n
i = n - 1
bn = 10 ** i
for x in range(bn, r):
	y = str(x)
	if len(y) == n and x % t == 0:
		l += [x]
		break
if len(l) == 0:
	print(-1)
else:
	print(l[0])


(n, t) = map(int, input().split())
k = t
if t < 10:
	if n > 1:
		print(t * 10 ** (n - 1))
	else:
		print(t)
elif n > 1:
	print(t ** (n - 1))
else:
	print(-1)


inp = input().split()
n = int(inp[0])
t = int(inp[1])
si = 10 ** (n - 1)
ei = 10 ** n
flag = False
for i in range(si, ei):
	if i % t == 0:
		print(i)
		flag = True
		break
if flag == False:
	print(-1)


(a, b) = input().split()
a = int(a)
b = int(b)
if a == 1 and b == 10:
	print(-1)
elif b == 10:
	print(10 ** (a - 1))
else:
	for i in range(a - 1):
		print(b, end='')
	print(b)


(n, t) = map(int, input().split())
trg = False
if t == 10 and n == 1:
	trg = True
	print(-1)
if t == 10 and (not trg):
	print(10 ** (n - 1))
	trg = True
if not trg:
	print(10 ** (n - 1) * t)


a = list(map(int, input().strip().split(' ')))
if a[1] == 10:
	if a[0] == 1:
		print('-1')
	else:
		for i in range(0, a[0] - 1):
			print('1', end='', sep='')
		print('0')
else:
	for i in range(0, a[0]):
		print(a[1], end='', sep='')


(n, t) = map(int, input().split())
k = '9' * n
for i in range(int(k, 10), 0, -1):
	if i % t == 0:
		if n == len(str(i)):
			print(i)
			break
else:
	print(-1)


(n, t) = input().split(' ', 2)
t = int(t)
n = int(n)
num = pow(10, n) - 1
final = num - num % t
if final > pow(10, n - 1) - 1:
	print(final)
else:
	print(-1)


(n, t) = map(int, input().split())
a = 10 ** (n - 1)
while len(str(a)) == n:
	if a % t == 0:
		print(a)
		exit()
	else:
		a += 1
print(-1)


(n, t) = map(int, input('').split())
s = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
if n == 1 and t >= 10:
	print(-1)
for i in range(10 ** (n - 1), 10 ** n):
	if i % t == 0:
		print(i)
		break


(n, t) = map(int, input().split())
x = 10 ** (n - 1) + 1
while True:
	if x < 10 ** n:
		if x % t == 0:
			print(x)
			break
	elif x >= 10 ** n:
		print(-1)
		break
	x = x + 1


n = list(map(int, input().split()))
x = 10 ** (n[0] - 1)
if n[0] > 1:
	t = n[1]
	while True:
		if x % t != 0:
			x += 1
		elif x % t == 0:
			print(x)
			break
		if x > 10 ** n[0]:
			print('-1')
			break
elif n[0] == 1:
	m = 1
	t = n[1]
	while True:
		if m % t != 0:
			m += 1
		if m % t == 0 and m < 10:
			print(m)
			break
		elif m == 10:
			print('-1')
			break


(n, t) = (int(i) for i in input().split())
s = 1
while n > 1:
	s *= 10
	n -= 1
l = s * 10
while s % t != 0:
	s += 1
	if s >= l:
		print(-1)
		exit(0)
print(s)


Numbers = input().split()
N1 = int(Numbers[0])
N2 = int(Numbers[1])
Result = ''
while len(Result) <= N1:
	Result += str(N2)
if len(Result) > N1:
	Result = Result[0:N1]
	if N2 == 10 and Result[len(Result) - 1] != '0':
		Result = str(int(Result) - 1)
if int(Result) % N2 != 0 or Result == '0':
	print(-1)
else:
	print(Result)


nt = input().split(' ')
n = int(nt[0])
t = nt[1]
e = len(t)
if n < e:
	print(-1)
else:
	print(int(t) * 10 ** (n - e))


(n, t) = [int(i) for i in input().split()]
check = False
for i in range(10 ** (n - 1), 10 ** n):
	if i % t == 0:
		check = True
		print(i)
		break
	else:
		continue
if check == False:
	print(-1)


st = input()
lest = len(st)
for a in range(lest):
	if st[a] == ' ':
		n = int(st[0:a])
		while st[a] == ' ':
			a += 1
		t = int(st[a:lest])
		break
if n == 1:
	if t == 10:
		t = -1
else:
	t = 5 * t * 10 ** (n - 2)
print(t)


def solve(n, t):
	number = 10 ** (n - 1)
	while number % t != 0:
		number += 1
		if number > 10 ** n - 1:
			number = -1
			break
	print(number)
s = input().split(' ')
n = int(s[0])
t = int(s[1])
solve(n, t)


(n, m) = map(int, input().split())
(t, u) = (pow(10, n - 1), pow(10, n))
while 1:
	if t % m != 0:
		t += 1
	elif t == u:
		print('-1')
		break
	elif t % m == 0:
		print(t)
		break


(a, b) = map(int, input().split())
c = str(b)
d = str(a)
if len(c) == a:
	print(b)
elif len(c) > a:
	print('-1')
else:
	for i in range(len(c), a):
		b *= 10
	print(b)


import time
(COL, ROW, LEN) = (1000, 1000, 26)
matrix = [[0] * COL for i in range(ROW)]
arr = [0] * LEN
direction = ((0, -1), (-1, 0), (0, 1), (1, 0))

class Pair:

	def __init__(self, x, y):
		self.x = x
		self.y = y

def timer(func, *pargs, **kargs):
	start = time.time()
	func(*pargs, **kargs)
	return time.time() - start
(n, t) = map(int, input().split())
if n == 1 and t == 10:
	print(-1)
elif t == 10:
	print(1, '0' * (n - 1), sep='')
else:
	print(str(t) * n)


(n, t) = map(int, input().split())
i = 10 ** (n - 1)
while True:
	if i % t == 0 and i % 100 != 0:
		print(i)
		break
	i = i + 1
	if i == pow(10, n):
		print(-1)
		break


(n, t) = map(int, input().split())
lower = '1' + '0' * (n - 1)
lower_num = int(lower)
upper = '9' * n
upper_num = int(upper)
ans = lower_num // t * t + t if lower_num % t != 0 else lower_num
ans = -1 if ans > upper_num else ans
print(ans)


x = input().split()
n = int(x[0])
d = int(x[1])
if n == 1 and d == 10:
	print(-1)
elif d == 10:
	print(10 ** (n - 1))
else:
	print(d * 10 ** (n - 1))


(n, t) = [int(x) for x in input().split()]
if n == 1 and t == 10:
	print('-1')
else:
	k = 10 ** (n - 1)
	while k % t != 0:
		k += 1
	print(k)


import random
(n, t) = map(int, input().split())
while True:
	a = random.randrange(10 ** (n - 1), 10 ** n)
	if n == 1 and t >= 10:
		print(-1)
		break
	if a % t == 0:
		print(a)
		break


(n, t) = map(int, input().split())
d = '1'
d += '0' * (n - 1)
while len(str(d)) == n:
	if int(d) % t == 0:
		print(d)
		exit()
	d = int(d) + 1
print(-1)


import sys
(n, t) = map(int, input().split())
min = '1'
for i in range(n - 1):
	min += '0'
min = int(min)
start = max(min // t, 1)
cur = start * t
while len(str(cur)) <= n:
	if len(str(cur)) == n:
		print(cur)
		sys.exit(0)
	cur *= t
print(-1)


(n, t) = input().split(' ')
n = int(n)
t = int(t)
if t <= 9:
	print(str(t) * n)
elif n == 1:
	print(-1)
else:
	print(str(1), end='')
	for i in range(0, n - 1):
		print(0, end='')


s = input()
(n, t) = [int(i) for i in s.split()]
i = 0
s1 = '1'
s1 += '0' * (n - 1)
s1 = int(s1)
s = s1 * 10
while s1 // s == 0:
	if s1 % t == 0:
		i = 1
		print(s1)
		break
	s1 += 1
if i == 0:
	print('-1')


(n, m) = map(int, input().split())
s = 10 ** (n - 1)
while s < 10 ** n:
	if s % m == 0:
		print(s)
		exit(0)
	s += 1
print(-1)


def test(num1):
	global min_num, max_num_num, t
	return min_num <= num1 * t and num1 * t <= max_num
(n, t) = map(int, input().split())
min_num = 10 ** (n - 1)
max_num = 10 ** n - 1
num = min_num // t
if test(num):
	print(num * t)
elif test(num + 1):
	print((num + 1) * t)
elif test(num + 2):
	print((num + 2) * t)
else:
	print(-1)


(a, b) = [int(x) for x in input().split()]
if b == 10:
	if a == 1:
		print(-1)
	else:
		zeros = ''.join(['0'] * (a - 1))
		print(f'1{zeros}')
else:
	print(''.join([str(b)] * a))


(a, b) = map(int, input().split())
c = '1'
d = 0
for i in range(a - 1):
	c += '0'
c = int(c)
if a > 1:
	for i in range(c, c + 50, 1):
		if i % b == 0:
			print(i)
			break
elif a <= 1:
	for i in range(1, 10, 1):
		if i % b == 0:
			print(i)
			d += 1
			break
	else:
		print(-1)


import sys
input = sys.stdin.buffer.readline
(n, t) = map(int, input().split())
if n < len(str(t)):
	print('-1')
else:
	s = '1'
	for i in range(n - 1):
		s += '0'
	s = int(s)
	print(s + t - s % t)


(n, k) = map(int, input().split(' '))
val = int(str(1) + '0' * (n - 1))
laa = 0
while not val % k == 0:
	val += 1
	if len(str(val)) > n:
		laa = 1
if laa == 1:
	print(-1)
else:
	print(val)


def solve(n, t):
	if len(str(t)) > n:
		return -1
	n = n if t < 10 else n - len(str(t)) + 1
	num = int('1' * n)
	num = num * t
	return num
(n, t) = map(int, input().split())
print(solve(n, t))


(n, t) = map(int, input().split())
out = '1'
for i in range(n - 1):
	out += '0'
out = int(out)
x = out % t
out += t - x
if len(str(out)) != n:
	print(-1)
else:
	print(out)


(a, b) = input().split()
print(-1 if len(b) > int(a) else b + (int(a) - len(b)) * '0')


x = input().strip().split()
(n, t) = (int(x[0]), int(x[1]))
if t < 10:
	while n > 0:
		print(t, end='')
		n = n - 1
elif n == 1:
	print('-1', end='')
else:
	print('1', end='')
	while n > 1:
		print('0', end='')
		n = n - 1


(n, t) = map(int, input().split())
res = None
if n == 1 and t == 10:
	res = -1
else:
	if t == 10:
		t = 1
	res = str(t) + '0' * (n - 1)
print(res)


(n, t) = map(int, input().split())
ans = 10 ** (n - 1)
while ans < 10 ** n:
	if ans % t == 0:
		print(int(ans))
		exit()
	ans += 1
print(-1)


(n, t) = map(int, input().split())
l = 0
s = 1
if n == 1 and t == 10:
	print(-1)
else:
	while l < n:
		s *= t
		ch = str(s)
		l = len(ch)
	print(s)


(n, m) = [int(x) for x in input().split()]
a = [1] * n
b = 0
if m == 10:
	a[-1] = 0
else:
	for i in range(n):
		b += 10 ** i
	t = b % m
	if t != 0:
		a[-1] += m - t
if n == 1 and m == 10:
	print(-1)
else:
	for elem in a:
		print(elem, end='')


inp = list(map(int, input().split()))
a = inp[0]
b = inp[1]
c = pow(10, a - 1)
c = c // b
c = (c + 1) * b
if pow(10, a - 1) <= c < pow(10, a):
	print(c)
else:
	print(-1)


import math as mt
digits = lambda x: 1 + mt.floor(mt.log(x, 10))
(n, t) = map(int, input().split())
if digits(t) > n:
	print(-1)
else:
	print(str(t) * n if t < 10 else 10 ** (n - 1))


from sys import stdin
(n, t) = [int(c) for c in stdin.readline().split()]
hl = 10 ** n - 1
while True:
	if hl % t == 0:
		y = hl / t
		break
	else:
		hl = hl - 1
if hl < t:
	print(-1)
else:
	print(hl)


inp = input().split(' ')
n = int(inp[0])
t = int(inp[1])
ans = t
if n < len(str(t)):
	print(-1)
else:
	while len(str(ans)) < n:
		ans *= 10
	print(ans)


(n, m) = map(int, input().split())
z = pow(10, n - 1)
x = pow(10, n)
while z < x:
	if z % m == 0:
		print(z)
		break
	else:
		z = z + 1
if z == x:
	print(-1)


(n, m) = map(int, input().split())
p = len(str(m))
print(-1 if p > n else m * 10 ** (n - p))


(n, t) = input().split()
print('-1' if len(t) > int(n) else t * int(n) if len(t) < 2 else '1' * (int(n) - 1) + '0')


(n, t) = [int(x) for x in input().split(' ')]
if n == 1 and t == 10:
	print('-1')
	exit()
num = 10 ** (n - 1)
if num % t != 0:
	num = num // t * t + t
print(num)


(n, t) = map(int, input().split())
num = 10 ** (n - 1)
for _ in range(9):
	if num % t == 0:
		print(num)
		exit(0)
	else:
		num += 1
print(-1)


def task1():
	(n, t) = map(int, input().split())
	x = int('1' + '0' * (n - 1))
	while x % t:
		x += 1
	if len(str(x)) != n:
		x = -1
	print(x)
task1()


(n, t) = map(int, input().split())
n1 = '1' + '0' * (n - 1)
n1 = int(n1)
n2 = n1 * 10
test = 0
for i in range(n1, n2):
	if i % t == 0:
		test = 1
		break
if test:
	print(i)
else:
	print(-1)


(a, b) = map(int, input().split())
k = 10 ** (a - 1)
c = b - k % b
if a == 1 and b == 10:
	print(-1)
else:
	print(k + c)


(n, t) = map(int, input().split())
if n == 1:
	if t == 10:
		print(-1)
	else:
		print(t)
	exit(0)
n = 10 ** (n - 1)
k = n % t
n += t - k
print(n)


a = input().split()
n = int(a[0])
t = int(a[1])
q = '9'
if 1 <= n <= 100 and 2 <= t <= 10:
	q = q * n
	x = int(q)
	y = x - x % t
if y == 0:
	y = -1
print(y)


try:
	(n, t) = list(map(int, input().split()))
	a = pow(10, n - 1)
	b = pow(10, n)
	for i in range(a, b):
		if i % t == 0:
			print(i)
			break
	else:
		print(-1)
except:
	pass


from sys import *
(x, y) = stdin.readline().split()
x = int(x)
y = int(y)
temp = 10 ** (x - 1)
d = (temp + y - 1) // y * y
d = str(d)
if len(d) == x:
	stdout.write(d + '\n')
else:
	stdout.write('-1' + '\n')


import sys
import io

def run(test, res):
	x = io.StringIO()
	with io.StringIO(test) as sys.stdin:
		with x as sys.stdout:
			work()
			z = x.getvalue().strip()
	sys.stdout = sys.__stdout__
	print(z == test)
	print(res)
	print(z)

def work():
	(n, t) = map(int, input().split())
	c = '1' + ''.join(['0'] * (n - 1))
	r = t * (1 + int(c) // t)
	if len(str(r)) != n:
		r = -1
	print(r)

def test():
	run('3 2', '102')
	run('1 9', '9')
	run('1 10', '-1')
if len(sys.argv) > 1:
	test()
else:
	work()


(n, m) = [int(x) for x in input().split()]
s = 10 ** (n - 1)
e = 10 ** n
t = (e - 1) % m
if e - 1 - t >= s and e - 1 - t < e:
	print(e - 1 - t)
else:
	print(-1)


(n, t) = map(int, input().split())
x = 10 ** (n - 1)
z = 10 ** n
for q in range(x, z):
	if q % t == 0:
		print(q)
		quit()
print('-1')


(n, t) = list(map(int, input().split()))
start = '1' + '0' * (n - 1)
end = '1' + '0' * n
for i in range(int(start), int(end)):
	if i % t == 0:
		print(i)
		quit()
print('-1')


(n, t) = [int(x) for x in input().split()]
number = pow(10, n)
number = number - 1
ans = number % t
number = number - ans
if number % t == 0 and number != 0:
	print(number)
else:
	print(-1)


(n, m) = map(int, input().split())
i = 10 ** (n - 1)
if n == 1 and m == 10:
	print(-1)
else:
	while i % m != 0:
		i += 1
	print(i)


x = input()
arr = x.split(' ')
length = int(arr[0])
t = int(arr[1].strip())
start = ''
end = '1'
while length != 0:
	start = start + '9'
	length -= 1
length = len(start)
while length != 1:
	end = end + '0'
	length -= 1
while int(start) % t != 0:
	start = int(start) - 1
	if int(start) == int(end):
		print(-1)
		exit()
print(start)


n_and_t = input().split()
n = int(n_and_t[0])
t = int(n_and_t[1])
x = str(t) + '0' * (n - 1)
if n == 1 and t == 10:
	print(-1)
elif t == 10:
	x = x[:-1]
	print(x)
else:
	print(int(x))


a = input()
b = a.split(' ')
n = int(b[0])
t = int(b[1])
num = '1'
end = '9'
if n > 1:
	p = n - 1
	for i in range(p):
		num += '0'
		end += '9'
num = int(num)
end = int(end)
for i in range(num, end + 1):
	if i % t == 0:
		print(i)
		break
else:
	print('-1')


(n, t) = map(int, input().split())
l = int('1' + '0' * (n - 1))
h = int('9' * n)
flag = 1
i = l
while i <= h:
	if i % t == 0:
		flag = 0
		print(i)
		break
	i += 1
if flag == 1:
	print('-1')


s = input().split(' ')
n = int(s[0])
t = int(s[1])
a = 1
b = 10
while len(str(a)) != n:
	a *= 10
	b *= 10
for i in range(a, b):
	if i % t == 0:
		print(i)
		quit()
print(-1)


(n, t) = map(int, input().split())
if n <= 6:
	l = list(filter(lambda x: x % t == 0, range(10 ** n)))
else:
	l = list(filter(lambda x: x % t == 0, range(10 ** (n - 1), 10 ** (n - 1) + 100)))
if l == [0]:
	print(-1)
else:
	print(max(l))


(digits, divisible) = map(int, input().split())
if digits == 1 and divisible == 10:
	print(-1)
elif digits != 1 and divisible == 10:
	print(10 ** (digits - 1))
else:
	print(str(divisible) * digits)


l1 = input().split()
n = int(l1[0])
t = int(l1[1])
s = ''
for x in range(1, n + 1):
	s = s + '0'
s = list(s)
s[0] = '1'
s = int(str(s).replace(',', '').replace("'", '').replace('[', '').replace(']', '').replace(' ', ''))
for x in range(s, s + 1000000000):
	if t == 10 and n == 1:
		print(-1)
		break
	if x % t == 0:
		print(x)
		break


(d, k) = map(int, input().split())
if k == 10 and d == 1:
	print(-1)
else:
	print(10 ** (d - 1) + k - 10 ** (d - 1) % k)


(n, t) = [int(x) for x in input().split()]
res = ''
if t < 10:
	for i in range(n):
		res += str(t)
elif n > 1:
	res += '1'
	for i in range(n - 1):
		res += '0'
else:
	res = -1
print(res)


(n, t) = map(int, input().split())
s1 = '1'
s2 = '9'
n = n - 1
s1 = int(s1 + str('0' * n))
s2 = int(s2 + str('9' * n))
bo = False
ii = -1
for i in range(s1, s2 + 1):
	if i % t == 0:
		bo = True
		ii = i
		break
if bo == True:
	print(ii)
else:
	print('-1')


(n, t) = map(int, input().split())
low = 10 ** (n - 1)
up = 10 ** n
l = -1
for x in range(low, up):
	if x % t == 0:
		l = x
		break
print(l)


(n, t) = map(int, input().split())
hl = 10 ** n - 1
r = hl % t
if r == 0:
	print(hl)
elif hl - r == 0:
	print(-1)
else:
	print(hl - r)