Little Dima misbehaved during a math lesson a lot and the nasty teacher Mr. Pickles gave him the following problem as a punishment. 

Find all integer solutions x (0 < x < 10^9) of the equation:x = b·s(x)^{a} + c,  

where a, b, c are some predetermined constant values and function s(x) determines the sum of all digits in the decimal representation of number x.

The teacher gives this problem to Dima for each lesson. He changes only the parameters of the equation: a, b, c. Dima got sick of getting bad marks and he asks you to help him solve this challenging problem.


-----Input-----

The first line contains three space-separated integers: a, b, c (1 ≤ a ≤ 5; 1 ≤ b ≤ 10000;  - 10000 ≤ c ≤ 10000).


-----Output-----

Print integer n — the number of the solutions that you've found. Next print n integers in the increasing order — the solutions of the given equation. Print only integer solutions that are larger than zero and strictly less than 10^9.


-----Examples-----
Input
3 2 8

Output
3
10 2008 13726 
Input
1 2 -18

Output
0

Input
2 2 -1

Output
4
1 31 337 967

Difficulty: MEDIUM

Solutions:
def s(x):
	res = 0
	while x > 0:
		res += x % 10
		x //= 10
	return res
(a, b, c) = map(int, input().split())
ans = []
for i in range(100):
	x = b * i ** a + c
	if x < 0:
		continue
	if s(x) == i and 0 < x < 10 ** 9:
		ans.append(x)
ans.sort()
print(len(ans))
if len(ans) != 0:
	print(*ans)


(a, b, c) = map(int, input().split())
sol = 0
li = []
mx = 10 ** 9
for i in range(1, 82):
	x = b * pow(i, a) + c
	if x < mx and x > 0:
		z = str(x)
		sm = 0
		for ele in z:
			sm += int(ele)
		if sm == i:
			sol += 1
			li.append(x)
print(sol)
print(*li)


import sys, itertools as it
(a, b, c) = map(int, input().split())
ans = []
for tmp in range(1, 82):
	x = b * tmp ** a + c
	if x > 0 and x < 1000000000.0 and (sum(map(int, list(str(x)))) == tmp):
		ans.append(x)
print(len(ans))
for v in ans:
	print(v, end=' ')


(a, b, c) = [int(i) for i in input().split()]
sol = []
for i in range(81):
	d = b * i ** a + c
	if d <= 0 or d >= 1000000000:
		continue
	if sum([int(j) for j in str(d)]) == i:
		sol.append(d)
print(len(sol))
sol.sort()
for i in sol:
	print(i, end=' ')


(a, b, c) = map(int, input().split())
ans = []
for sum in range(1, 200):
	x = b * sum ** a + c
	if x <= 0 or x >= 10 ** 9:
		continue
	summ = 0
	for aa in str(x):
		summ += int(aa)
	if sum == summ:
		ans.append(x)
print(len(ans))
print(*ans)


from sys import stdin

def bin_pow(a, n):
	if n == 0:
		return 1
	if n % 2:
		return a * bin_pow(a * a, (n - 1) // 2)
	else:
		return bin_pow(a * a, n // 2)
INF = 10 ** 9

def main():
	line = stdin.readline
	(a, b, c) = map(int, line().split())
	answers = []
	for s in range(81):
		v = b * int(pow(s, a)) + c
		if v <= 0 or v >= INF:
			continue
		sum_digits = sum((int(c) for c in str(v)))
		if sum_digits == s:
			answers.append(v)
	print(len(answers))
	for ans in answers:
		print(ans, end=' ')
main()


def sumn(n, j, i):
	ans = 0
	if len(str(n)) == i:
		for k in range(i):
			ans += n % 10
			n //= 10
		if ans == j:
			return 1
		else:
			return 0
	return 0
(a, b, c) = map(int, input().split())
l = []
for i in range(1, 10):
	for j in range(i * 9 + 1):
		temp = c + b * j ** a
		if sumn(temp, j, i):
			if temp != 0:
				l.append(temp)
print(len(l))
if len(l) > 0:
	print(*l)


ans = []

def SUM(x):
	ans = 0
	while x > 0:
		ans += x % 10
		x //= 10
	return ans
(a, b, c) = map(int, input().split())
for i in range(1, 82):
	x = b * pow(i, a) + c
	if x >= 1000000000:
		break
	elif SUM(x) == i:
		ans.append(str(x))
print(len(ans))
print(' '.join(ans))


def checksum(x):
	s = 0
	while x > 0:
		s += x % 10
		x = x // 10
	return s
(a, b, c) = map(int, input().split())
k = 1
sol = []
while k <= 81:
	x = b * k ** a + c
	if x < 10 ** 9:
		if k == checksum(x):
			sol.append(x)
	k += 1
print(len(sol))
sol = sorted(sol)
if len(sol) > 0:
	print(*sol)


(a, b, c) = map(int, input().split())
ans = []
for i in range(1, 82):
	x = b * i ** a + c
	if (x > 0 and sum(map(int, list(str(x))))) == i and x < 1000000000.0:
		ans.append(x)
print(len(ans))
print(' '.join(map(str, ans)))


def getSum(n):
	ans = 0
	while n != 0:
		ans += int(n % 10)
		n = int(n // 10)
	return ans
(a, b, c) = map(int, input().split())
ans = []
for i in range(82):
	x = b * i ** a + c
	if x > 0 and x < 1000000000.0 and (i == getSum(x)):
		ans.append(x)
print(len(ans))
if len(ans) != 0:
	print(*ans)


def find_digit_sum(x):
	s = 0
	while x > 0:
		s += x % 10
		x //= 10
	return s

def exponent_mod(n, p, prime_const=1000000000 + 7):
	res = 1
	if n == 0:
		return 0
	while p > 0:
		if p % 2 == 1:
			res = res * n % prime_const
		p //= 2
		n = n * n % prime_const
	return res

def find_solutions(a, b, c):
	solutions = []
	for j in range(1, 82):
		x = b * j ** a + c
		if j == find_digit_sum(x) and x < pow(10, 9):
			solutions.append(x)
	return solutions
t = 1
while t:
	t -= 1
	prime_const = pow(10, 9) + 7
	values = list(map(int, input().strip().split()))[:3]
	a = values[0]
	b = values[1]
	c = values[2]
	solutions = find_solutions(a, b, c)
	print(len(solutions))
	print(' '.join((str(x) for x in solutions)))


D = 9 * 9
(a, b, c) = map(int, input().split())
OZ = ord('0')
r = []
for d in range(1, D):
	x = b * d ** a + c
	if x <= 0 or 10 ** 9 <= x:
		continue
	if d == sum((ord(c) - ord('0') for c in str(x))):
		r.append(x)
print(len(r))
if r:
	print(*r)


def lhs(x):
	if x <= 0:
		return 0
	string = str(x)
	add = 0
	for i in range(len(string)):
		add += int(string[i])
	return add

def main():
	(a, b, c) = map(int, input().split())
	ans = []
	for i in range(1, 82):
		x = b * i ** a + c
		x1 = lhs(int(x))
		if x1 == i and x > 0 and (x < 10 ** 9):
			ans.append(int(x))
	print(len(ans))
	for x in ans:
		print(x, end=' ')
main()


(a, b, c) = map(int, input().split())
r = []
for s in range(1, 82):
	x = b * s ** a + c
	if x > 0 and x < 1000000000 and (sum((int(i) for i in str(x))) == s):
		r += [x]
print(len(r))
if len(r) > 0:
	print(' '.join(map(str, r)))


def summ(n):
	a = list(map(int, str(n)))
	return sum(a)
inpt = list(map(int, input().split(' ')))
a = inpt[0]
b = inpt[1]
c = inpt[2]
arr = []
count = 0
for i in range(1, 82):
	num = b * i ** a + c
	if num > 0 and num <= 1000000000 and (summ(num) == i):
		count += 1
		arr.append(num)
arr = sorted(arr)
print(count)
for i in arr:
	print(i, end=' ')


(a, b, c) = map(int, input().split(' '))
res = []
for i in range(1, 9 * 9 + 1):
	curr = f = b * i ** a + c
	if not (0 < curr and curr < int(1000000000.0)):
		continue
	d = 0
	while f > 0:
		d += f % 10
		f //= 10
	if d == i:
		res += [curr]
print(len(res))
print(*sorted(res))


(a, b, c) = [int(x) for x in input().split()]
l = []
for i in range(1, 82):
	x = b * i ** a + c
	if (x > 0 and x < 10 ** 9) and sum(map(int, str(x))) == i:
		l.append(x)
print(len(l))
print(*l)


def sum_dig(x):
	ans = 0
	while x != 0:
		ans += x % 10
		x //= 10
	return ans
(a, b, c) = list(map(int, input().split()))
A = 100 * [0]
pos = 0
for sum_dig_x in range(100):
	x = b * sum_dig_x ** a + c
	if 0 < x < 1000000000 and sum_dig(x) == sum_dig_x:
		A[pos] = x
		pos += 1
print(pos)
print(' '.join(list(map(str, A[:pos]))))


def sx(number):
	res = 0
	if number[0] == '-':
		return 0
	for i in range(len(number)):
		res += int(number[i])
	return res
input_str = input()
(a, b, c) = (int(input_str.split()[0]), int(input_str.split()[1]), int(input_str.split()[2]))
results = []
for s in range(1, 81):
	res = b * s ** a + c
	if sx(str(res)) == int(s) and res < 1000000000:
		results.append(res)
res_str = ''
res_str = ' '.join((str(results[i]) for i in range(len(results))))
print(len(results))
if len(results):
	print(res_str)


import math

def get_digits_sum(ans):
	res = 0
	while ans > 0:
		res += ans % 10
		ans = int(ans / 10)
	return res
(a, b, c) = map(int, input().split())
array = []
for i in range(81):
	ans = int(b * math.pow(i, a) + c)
	if ans <= 0 or ans >= 1000000000:
		continue
	digitsSum = get_digits_sum(ans)
	if digitsSum == i:
		array.append(ans)
print(len(array))
for i in range(len(array)):
	print(array[i], end=' ')


(a, b, c) = map(int, input().split())
l = []
for i in range(1, 82):
	v = str(b * i ** a + c)
	k = 0
	for j in range(len(v)):
		if v[0] == '-':
			break
		k = k + int(v[j])
	if k == i and v[0] != '-' and (int(v) < 1000000000):
		l.append(v)
print(len(l))
print(*l)


(a, b, c) = map(int, input().split())
count = 0
ans = []

def f(x):
	e = 0
	x = list(str(x))
	if x.count('-') == 0:
		for j in x:
			e += int(j)
	return e
for i in range(1, 82):
	x = b * i ** a + c
	r = f(x)
	if x > 0 and i == r:
		ans.append(x)
ans.sort()
an = []
for l in ans:
	if l < 10 ** 9:
		an.append(l)
if len(an) == 0:
	print(0)
else:
	print(len(an))
	print(*an)


def s(x):
	if x < 0:
		return 0
	a = str(x)
	res = 0
	for item in a:
		res += int(item)
	return res
(a, b, c) = map(int, input().split())
ans = []
for i in range(1, 100):
	x = b * i ** a + c
	if x >= 10 ** 9 or x <= 0:
		continue
	if s(x) == i:
		ans.append(x)
ans.sort()
print(len(ans))
for item in ans:
	print(item, end=' ')


import math
import sys

def DigitSum(x):
	res = 0
	while x > 0:
		res += x % 10
		x //= 10
	return res
(a, b, c) = map(int, input().split())
res = []
for s in range(1, 82):
	x = b * s ** a + c
	if x <= 0 or x >= 10 ** 9:
		continue
	if DigitSum(x) == s:
		res.append(x)
print(len(res))
for i in res:
	print(i, end=' ')


def answer(a, b, c):
	l = []
	for i in range(1, 82):
		x = b * i ** a + c
		count = 0
		t = x
		while t > 0:
			count += t % 10
			t = t // 10
		if count == i and x < 10 ** 9:
			l.append(x)
	return l
(a, b, c) = map(int, input().split())
ans = answer(a, b, c)
print(len(ans))
print(*ans)


def f(x):
	y = str(x)
	s = 0
	for i in range(len(y)):
		s += int(y[i])
	return s

def main():
	n = 0
	tab = []
	(a, b, c) = map(int, input().split())
	for s in range(1, 100):
		x = b * s ** a + c
		if 0 < x < 1000000000 and f(x) == s:
			n += 1
			tab += [x]
	print(n)
	if n != 0:
		tab.sort()
		for i in range(len(tab)):
			print(tab[i], end=' ')
		print()
main()


(a, b, c) = map(int, input().split())
ans = []

def sum_digit(num):
	sum_no = 0
	while num >= 10:
		sum_no += num % 10
		num = num // 10
	sum_no = sum_no + num
	return sum_no
for _ in range(0, 82):
	x = b * pow(_, a) + c
	y = x
	x = sum_digit(x)
	if x == _ and y < 1000000000 and (y > 0):
		ans.append(y)
print(len(ans))
if len(ans) != 0:
	for _ in range(0, len(ans)):
		print(ans[_], end=' ')
	print('')


(a, b, c) = list(map(int, input().split()))
ans = []
for i in range(83):
	x = b * i ** a + c
	if x <= 0 or x > 10 ** 9:
		continue
	sum_of_x = sum([int(x) for x in str(x)])
	if sum_of_x == i:
		ans.append(x)
print(len(ans))
if len(ans):
	print(*ans)


(a, b, c) = list(map(int, input().split()))
ans = []

def sum_digits(n):
	res = 0
	while n > 0:
		res += n % 10
		n //= 10
	return res
for i in range(1, 82):
	x = b * i ** a + c
	if 0 < x < 1000000000 and sum_digits(x) == i:
		ans.append(x)
print(len(ans))
if len(ans) > 0:
	print(*ans)


mm = 10 ** 9
(a, b, c) = list(map(int, input().split()))
arr = []
for k in range(0, 82):
	ans = b * k ** a + c
	if ans > 0:
		if sum(list(map(int, list(str(ans))))) == k and ans < mm:
			arr.append(ans)
print(len(arr))
print(*arr)


def sumdig(x):
	x = str(x)
	s = 0
	for i in x:
		s = s + int(i)
	return s
L = []
(a, b, c) = map(int, input().strip().split())
for i in range(1, 82):
	x = b * i ** a + c
	if x > 0 and x < 10 ** 9 and (i == sumdig(x)):
		L.append(x)
print(len(L))
for i in range(len(L)):
	print(L[i], end=' ')


import sys, os, io

def rs():
	return sys.stdin.readline().rstrip()

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

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

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
import math, datetime, functools, itertools, operator, bisect, fractions, statistics
from collections import deque, defaultdict, OrderedDict, Counter
from fractions import Fraction
from decimal import Decimal
from sys import stdout
from heapq import heappush, heappop, heapify, _heapify_max, _heappop_max, nsmallest, nlargest
sys.setrecursionlimit(111111)
INF = 99999999999999999999999999999999

def main():
	mod = 1000000007
	starttime = datetime.datetime.now()
	if os.path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	tc = 1
	for _ in range(tc):
		(a, b, c) = ria()
		ans = []
		for sx in range(1, 82):
			z = b * sx ** a + c
			s = 0
			if z <= 0 or z >= 1000000000:
				continue
			else:
				k = str(z)
			for i in k:
				s += int(i)
			if s == sx:
				ans.append(z)
		wi(len(ans))
		wia(sorted(ans))
	endtime = datetime.datetime.now()
	time = (endtime - starttime).total_seconds() * 1000
	if os.path.exists('input.txt'):
		print('Time:', time, 'ms')

class FastReader(io.IOBase):
	newlines = 0

	def __init__(self, fd, chunk_size=1024 * 8):
		self._fd = fd
		self._chunk_size = chunk_size
		self.buffer = io.BytesIO()

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size))
			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, size=-1):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size if size == -1 else size))
			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()

class FastWriter(io.IOBase):

	def __init__(self, fd):
		self._fd = fd
		self.buffer = io.BytesIO()
		self.write = self.buffer.write

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

class FastStdin(io.IOBase):

	def __init__(self, fd=0):
		self.buffer = FastReader(fd)
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

class FastStdout(io.IOBase):

	def __init__(self, fd=1):
		self.buffer = FastWriter(fd)
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.flush = self.buffer.flush
sys.stdin = FastStdin()
sys.stdout = FastStdout()
main()


def fastio():
	import sys
	from io import StringIO
	from atexit import register
	global input
	sys.stdin = StringIO(sys.stdin.read())
	input = lambda : sys.stdin.readline().rstrip('\r\n')
	sys.stdout = StringIO()
	register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
MOD = 10 ** 9 + 7
I = lambda : list(map(int, input().split()))
(a, b, c) = I()
l = set()
for i in range(1, 82):
	k = b * i ** a + c
	if 0 < k < 10 ** 9:
		l.add((b * i ** a + c, i))
ans = []
for i in l:
	if sum([int(i) for i in str(i[0])]) == i[1]:
		ans.append(i[0])
print(len(ans))
print(*sorted(ans))


import math

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

def s(x):
	if x < 0:
		return 0
	res = 0
	st = str(x)
	for i in range(len(st)):
		res += int(st[i]) - int('0')
	return res
ss = input().split(' ')
a = int(ss[0])
b = int(ss[1])
c = int(ss[2])
array = []
for sx in range(100):
	value = b * sx ** a + c
	if s(value) == sx:
		if value > 0 and value < 1000000000:
			array.append(value)
print(len(array))
print(str(array).replace('[', '').replace(']', '').replace(',', ''))


(a, b, c) = input().split()
a = int(a)
b = int(b)
c = int(c)

def fun(xx):
	return b * xx ** a + c
lis = []
for i in range(1, 100):
	k = fun(i)
	if k > 0:
		lis.append(k)
ans = []
mx = 10 ** 9
for i in range(len(lis)):
	k = sum([int(d) for d in str(lis[i])])
	chk = lis[i] == fun(k)
	if lis[i] < mx and chk and (lis[i] > 0):
		ans.append(lis[i])
op = ''
for i in range(len(ans)):
	op += str(ans[i]) + ' '
print(len(ans))
if len(op) > 0:
	print(op)


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

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

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

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

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

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

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

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

def sortDictWithKey(passedDic):
	return dict(OrderedDict(sorted(passedDic.items())))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

def s(num):
	temp = str(num)
	toret = 0
	for ch in temp:
		toret += int(ch)
	return toret
(a, b, c) = MAP()
ans = 0
l = []
for k in range(1, 81):
	x = b * k ** a + c
	if x > 0 and x < 10 ** 9:
		if s(x) == k:
			ans += 1
			l.append(x)
print(ans)
if ans != 0:
	print(*l)


def sumofdigits(n):
	ans = 0
	while n > 0:
		ans += n % 10
		n //= 10
	return ans
(a, b, c) = map(int, input().split())
ans = []
for s in range(1, 82):
	d = b * s ** a + c
	if sumofdigits(d) == s and 0 < d < 1000000000:
		ans.append(d)
print(len(ans), '\n', ' '.join(map(str, ans)), sep='')


import os
import sys
from io import BytesIO, IOBase
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():
	try:
		(a, b, c) = invr()
		sx = 1
		ans = 0
		ul = 10 ** 9
		arr = []
		while sx <= 81:
			x = b * sx ** a + c
			if 0 < x < ul and sx == sum([int(j) for j in str(x)]):
				ans += 1
				arr.append(x)
			sx += 1
		print(ans)
		print(*sorted(arr), sep=' ')
	except Exception as e:
		print(e)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

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

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

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

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

class IOWrapper(IOBase):

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


(a, b, c) = map(int, input().split())
l = []

def s(n):
	t = 0
	while n > 0:
		t += n % 10
		n //= 10
	return t
for x in range(1, 1000):
	n = x ** a * b + c
	if s(n) == x and n < 10 ** 9:
		l.append(str(n))
print(len(l))
print(' '.join(l))


def digitsum(x):
	res = 0
	while x > 0:
		res = res + x % 10
		x = x // 10
	return res
(a, b, c) = map(int, input().split())
ans = []
for s in range(1, 100):
	x = b * s ** a + c
	if x > 0 and x < 10 ** 9 and (digitsum(x) == s):
		ans.append(x)
print(len(ans))
print(*sorted(ans))


def su(n):
	s = 0
	while n:
		s += n % 10
		n //= 10
	return s
(a, b, c) = map(int, input().split())
l = []
for i in range(1, 82):
	t = b * i ** a + c
	if t > 0 and su(t) == i and (t < 10 ** 9):
		l += [t]
l = set(l)
l = list(l)
t = max(len(l), 0)
print(t)
if t == 0:
	exit()
l.sort()
for i in l:
	print(i, end=' ')


(a, b, c) = list(map(int, input().split()))
d = []
r = []

def c_sum(s):
	s1 = 0
	for j in str(s):
		s1 += int(j)
	return s1
for i in range(81):
	v = i + 1
	res = b * v ** a + c
	if 1000000000 > res > 0 and c_sum(res) == v:
		r.append(res)
r.sort()
print(len(r))
if len(r):
	print(' '.join(map(str, r)))


def take_input(s):
	if s == 1:
		return int(input())
	return map(int, input().split())
(a, b, c) = take_input(3)
rhs = []

def power(a, b):
	ans = 1
	for i in range(b):
		ans *= a
	return ans

def sm(x):
	s = 0
	while x:
		s += x % 10
		if x > 0:
			x //= 10
		else:
			x = x // 10 + 1
	return s
ans = []
count = 0
for i in range(1, 82):
	val = b * power(i, a) + c
	if sm(val) == i and 0 < val < 1000000000:
		ans.append(val)
		count += 1
print(count)
print(*ans)


(a, b, c) = map(int, input().split())
l = []
bbb = []
for i in range(1, 82):
	pp = b * i ** a + c
	p = abs(pp)
	bb = str(p)
	aa = list(bb)
	ans = 0
	for j in range(len(aa)):
		ans += int(aa[j])
	bbb.append(ans)
	if ans == i and pp > 0 and (pp < 10 ** 9):
		l.append(pp)
print(len(l))
print(*l)


import math

def sum_digits(n):
	ans = 0
	while n > 0:
		r = n % 10
		n = n // 10
		ans += r
	return ans
(a, b, c) = [int(i) for i in input().split()]
arr = []
for i in range(1, 91):
	tot = b * int(math.pow(i, a)) + c
	if i == sum_digits(tot) and 0 <= tot < 1000000000:
		arr.append(tot)
print(len(arr))
print(*arr)


def solve(r):
	summ = 0
	for i in str(abs(r)):
		summ += int(i)
	return summ
(a, b, c) = map(int, input().split())
ans = []
for i in range(1, 82):
	r = b * i ** a + c
	if r > 0 and r < 10 ** 9 and (solve(r) == i):
		ans.append(r)
print(len(ans))
print(*ans)


import sys
input = lambda : sys.stdin.readline().strip('\r\n')
(a, b, c) = map(int, input().split())
ans = []
for i in range(1, 82):
	x = b * i ** a + c
	if 0 < x < 10 ** 9:
		if sum((int(i) for i in str(x))) == i:
			ans.append(x)
print(len(ans))
print(*ans)


(a, b, c) = [int(x) for x in input().split()]
roots = []
for i in range(1, 81 + 1):
	x = b * i ** a + c
	if x > 0:
		if x < 1000000000:
			t = x // 10
			s = x % 10
			while t > 0:
				s += t % 10
				t //= 10
			if s == i:
				roots.append(x)
		else:
			break
print(len(roots))
for x in roots:
	print(x, end=' ')
print()


import math
I = lambda : map(int, input().split())
(a, b, c) = I()

def simple(l):
	c = 0
	for i in range(len(l)):
		c += int(l[i])
	return c
l = []
for i in range(1, 82):
	x = pow(i, a)
	y = b * x + c
	if y > 0 and y <= 10 ** 9:
		xi = list(str(y))
		xs = simple(xi)
		if xs == i:
			l.append(y)
print(len(l))
if len(l) != 0:
	print(*l)


(a, b, c) = map(int, input().split())
maxx = min(b * 81 ** a + c, 10 ** 9)
l = []
x = 1

def valid(x, k):
	sum = 0
	for c in str(x):
		sum += int(c)
	return sum ** a == k
i = 1
while x <= maxx:
	k = i ** a
	x = b * k + c
	if x > 0 and x <= 10 ** 9 and valid(x, k):
		l.append(x)
	i += 1
print(len(l))
print(*l)


def dsum(n):
	r = 0
	while n > 0:
		r += n % 10
		n //= 10
	return r

def main():
	(a, b, c) = map(int, input().split())
	res = []
	for s in range(82):
		r = b * s ** a + c
		if dsum(r) == s and 0 < r < 1000000000:
			res.append(r)
	print(len(res))
	print(' '.join(map(str, sorted(res))))
main()


(a, b, c) = map(int, input().split())
res = []
for i in range(1, 82):
	x = b * i ** a + c
	if 0 < x < 1000000000 and sum(map(int, str(x))) == i:
		res.append(x)
print(len(res))
if res:
	res.sort()
	print(*res)


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

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

def si():
	return input()

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

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

def bo(i):
	return ord(i) - ord('a')

def sod(x):
	s = str(x)
	s1 = 0
	for i in s:
		s1 += int(i)
	return s1

def solve():
	(a, b, c) = mi()
	ans = []
	for i in range(1, 82):
		x = b * pow(i, a) + c
		if x > 0 and x < 1000000000.0 and (sod(x) == i):
			ans.append(x)
	print(len(ans))
	print(*ans)
solve()


(a, b, c) = input().split()
(a, b, c) = (int(a), int(b), int(c))

def S(x):
	if x < 0:
		return 0
	else:
		x = str(x)
		s = 0
		for char in x:
			s += int(char)
		return s
cnt = 0
lis = []
for x in range(1, 82):
	y = b * x ** a + c
	if S(y) == x and y < 10 ** 9:
		lis.append(b * x ** a + c)
		cnt += 1
print(cnt)
if cnt != 0:
	for k in lis:
		print(k, end=' ')


solutions = []
(a, b, c) = list(map(int, input().split(' ')))
for s in range(1, 82):
	x = b * s ** a + c
	if 0 < x < 10 ** 9:
		if sum(map(int, list(str(x)))) == s:
			solutions.append(x)
print(len(solutions))
print(' '.join(map(str, solutions)))


def sum_n(x):
	return sum(map(int, list(str(x))))
(a, b, c) = map(int, input().split())
result = []
for s in range(1, 82):
	x = b * s ** a + c
	if 0 < x < 10 ** 9 and s == sum_n(x):
		result.append(str(x))
print(len(result))
if len(result):
	print(' '.join(result))


def s(x):
	return sum([int(d) for d in str(x)])
(a, b, c) = map(int, input().split())
solutions = []
if a == 1:
	for x in range(1, 550001):
		if x == b * s(x) ** a + c:
			solutions.append(x)
else:
	power = 1
	while b * power ** a + c < 10 ** 9:
		x = b * power ** a + c
		if x > 0 and power == s(x):
			solutions.append(x)
		power += 1
print(len(solutions))
print(*solutions, sep=' ')


(a, b, c) = (int(i) for i in input().split(' '))
import sys

def calculate(a, b, c, s):
	return b * s ** a + c

def dig_sum(x):
	line = str(x).strip('-')
	sum = 0
	for i in list(line):
		sum += int(i)
	return sum
res = []
for i in range(1, 82):
	x = calculate(a, b, c, i)
	if dig_sum(x) == i:
		res.append(x)
res.sort()
res = [str(i) for i in res if i >= 0 and i < 1000000000]
print(len(res))
print(' '.join(res))
sys.exit(0)


(a, b, c) = map(int, input().split())
ans = []
for sx in range(9 * 9 + 1):
	x = b * sx ** a + c
	if x > 0 and x < 1000000000.0 and (sum(map(int, list(str(x)))) == sx):
		ans.append(x)
ans.sort()
print(len(ans))
print(*ans)


(a, b, c) = map(int, input().split())
ans = []

def dsum(x):
	if x <= 0 or x >= 1000000000.0:
		return -1
	else:
		ans = 0
		for i in str(x):
			ans += int(i)
		return ans
for s in range(1, 82):
	x = b * s ** a + c
	if dsum(x) == s:
		ans.append(x)
ans.sort()
print(len(ans))
for i in ans:
	print(i, end=' ')


(a, b, c) = map(int, input().split())
ans = []
for i in range(1, 82):
	temp = b * i ** a + c
	if temp > 0 and temp < 10 ** 9:
		s = str(temp)
		l = len(s)
		p = 0
		for j in range(l):
			p += int(s[j])
		if p == i:
			ans.append(temp)
ans.sort()
print(len(ans))
print(*ans)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
mod2 = 998244353
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

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

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

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

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

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def IF(c, t, f):
	return t if c else f

def YES(c):
	return IF(c, 'YES', 'NO')

def Yes(c):
	return IF(c, 'Yes', 'No')

def main():
	t = 1

	def s(x):
		return sum(map(int, str(x)))
	rr = []
	for _ in range(t):
		(a, b, c) = LI()
		r = []
		for i in range(1, 82):
			x = b * i ** a + c
			if x > 0 and s(x) == i and (x < 10 ** 9):
				r.append(x)
		rr.append(len(r))
		rr.append(JA(r, ' '))
	return JA(rr, '\n')
print(main())


def mlt():
	return map(int, input().split())
(a, b, c) = mlt()
res = []
for n in range(1, 82):
	v = b * n ** a + c
	if v < 0:
		continue
	p = sum(list(map(int, str(v))))
	if n == p and v < 10 ** 9:
		res.append(v)
print(len(res))
print(*res)


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

def si():
	return input()

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

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

def su(n):
	s = 0
	while n:
		a = n % 10
		s += a
		n //= 10
	return s
for _ in range(1):
	(a, b, c) = mi()
	l = []
	for i in range(82):
		l.append(pow(i + 1, a) * b + c)
	l1 = []
	for i in range(82):
		if l[i] > 0 and l[i] < 1000000000.0 and (i + 1 == su(l[i])):
			l1.append(l[i])
	print(len(l1))
	if len(l1):
		print(*l1)


def s(x):
	if x < 0:
		return -100000
	if x == 0:
		return 0
	else:
		return x % 10 + s(x // 10)
(a, b, c) = map(int, input().split())
r = []
for i in range(1, 82):
	if s(b * i ** a + c) == i and b * i ** a + c < 1000000000:
		r += [b * i ** a + c]
print(len(r))
print(' '.join(map(str, r)))


data = input().split()
(a, b, c) = (int(data[0]), int(data[1]), int(data[2]))
candidate = [b * i ** a + c for i in range(1, 82)]
res = []

def sumx(x):
	s = 0
	while x:
		s += x % 10
		x //= 10
	return s
for x in candidate:
	if 0 < x < 10 ** 9 and b * sumx(x) ** a + c == x:
		res.append(x)
print(len(res))
for i in res:
	print(i, end=' ')


def digits_sum(x):
	return 0 if x == 0 else x % 10 + digits_sum(x // 10)
((a, b, c), ans, arr) = (map(int, input().split()), 0, [])
for i in range(1, 82):
	if 10 ** 9 >= b * i ** a + c > 0 and digits_sum(b * i ** a + c) == i:
		ans += 1
		arr.append(b * i ** a + c)
print(ans)
print(*arr)


from sys import *
from math import *
(a, b, c) = map(int, stdin.readline().split())
ans = []
n = 10 ** 2
for i in range(1, n):
	x = b * i ** a + c
	sm = 0
	y = x
	while x > 0:
		sm += x % 10
		x = x // 10
	if sm == i and y < 10 ** 9:
		ans.append(y)
print(len(ans))
print(*ans)


ans = list()
(a, b, c) = map(int, input().split())
for sx in range(9 * 9 + 1):
	x = b * sx ** a + c
	if x > 0 and x < 1000000000:
		s = sum([int(it) for it in str(x)])
		if s == sx:
			ans.append(x)
print(len(ans))
for i in ans:
	print(i, end=' ')


def sum(n):
	s = 0
	while n > 0:
		r = n % 10
		n = n // 10
		s += r
	return s
(a, b, c) = map(int, input().split())
f = []
for i in range(1, 81):
	x = b * pow(i, a) + c
	if x > 1000000000:
		break
	if sum(x) == i:
		f.append(x)
print(len(f))
for i in range(len(f)):
	print(f[i], end=' ')


(a, b, c) = map(int, input().split(' '))
res = []
for sx in range(1, 9 * 9 + 1):
	cur = left = b * sx ** a + c
	if not 0 < cur < 10 ** 9:
		continue
	sd = 0
	while left > 0:
		sd += left % 10
		left //= 10
	if sd == sx:
		res += [cur]
print(len(res))
print(*sorted(res))


def sum_digits3(n):
	r = 0
	while n:
		(r, n) = (r + n % 10, n // 10)
	return r
(a, b, c) = input().split(' ')
a = int(a)
b = int(b)
c = int(c)
la = []
for i in range(82, 0, -1):
	k = b * i ** a + c
	if k < 0:
		break
	if sum_digits3(k) == i and k < 10 ** 9:
		la.append(k)
print(len(la))
la = reversed(la)
for i in la:
	print(i, end=' ')


(a, b, c) = map(int, input().split())
solutions = []

def check_if_valid_res(number, number_check):
	x = 0
	while number > 0:
		x += int(number % 10)
		number = number // 10
	return True if x == number_check else False
for i in range(1, 82):
	sum_of_x = i ** a
	approx_res = b * sum_of_x + c
	result_val = check_if_valid_res(approx_res, i)
	if result_val:
		solutions.append(approx_res)
if len(solutions) > 0:
	final_res = []
	for i in range(len(solutions)):
		if solutions[i] > 0 and solutions[i] < pow(10, 9):
			final_res.append(solutions[i])
	print(len(final_res))
	print(*final_res)
else:
	print(0)


(a, b, c) = map(int, input().split())

def s(x):
	xStr = str(x)
	sum = 0
	for c in xStr:
		sum += int(c)
	return sum
rightSide = []
M = 9 * 9 + 1
for k in range(1, M):
	rightSide.append(b * k ** a + c)
myList = []
sol = 0
for x in rightSide:
	if x > 0 and x < int(1000000000.0) and (x == b * s(x) ** a + c):
		sol += 1
		myList.append(x)
myList.sort()
print(sol, end='\n')
for num in myList:
	print(num, sep=' ', end=' ')


def conv(n):
	n = list(str(n))
	n = map(int, n)
	return sum(n)
(a, b, c) = map(int, input().split())
ans = []
l = 0
for i in range(1, 82):
	x = b * i ** a + c
	if 0 < x <= 10 ** 9 and conv(x) == i:
		l += 1
		ans.append(x)
if l == 0:
	print(0)
else:
	print(l)
	print(*ans)


(a, b, c) = map(int, input().split())
ans = []
for i in range(1, 82):
	temp = b * i ** a + c
	t = 0
	if temp > 0:
		for j in str(temp):
			t += int(j)
		if t == i:
			if int(temp) > 0 and int(temp) <= 10 ** 9:
				ans.append(temp)
print(len(ans))
print(*ans)


def spam(a):
	r = 0
	for c in str(a):
		r += int(c)
	return r
(a, b, c) = map(int, input().split())
r = []
s = 1
for s in range(1, 82):
	x = b * s ** a + c
	if 0 < x < 10 ** 9 and s == spam(x):
		r += [str(x)]
print(len(r))
print(' '.join(r))


import sys
sys.setrecursionlimit(10000)
(a, b, c) = [int(x) for x in sys.stdin.readline().strip().split()]
count = 0

def sum_digits(d):
	s = 0
	while d:
		s += d % 10
		d = d // 10
	return s
arr = []
count = 0
for i in range(1, 81):
	k = b * i ** a + c
	if 0 < k < 10 ** 9 and sum_digits(k) == i:
		count += 1
		arr.append(str(k))
if count != 0:
	print(count)
	print(' '.join(arr))
else:
	print(count)


(a, b, c) = map(int, input().split())
res = []

def f(x):
	c = 0
	for i in range(len(str(x))):
		c += int(list(str(x))[i])
	return c
for i in range(1, 82):
	d = b * i ** a + c
	if d <= 0:
		continue
	if d == int(d) and f(d) == i and (d < 10 ** 9):
		res.append(b * i ** a + c)
if len(res) == 0:
	print(0)
	quit()
print(len(res))
print(' '.join(map(str, res)))


def main():
	(a, b, c) = read()
	res = []
	for i in range(1, 82):
		x = b * i ** a + c
		if x <= 0 or x >= 10 ** 9:
			continue
		if sum(map(int, list(str(x)))) == i:
			res.append(x)
	res.sort()
	print(len(res))
	print(' '.join(map(str, res)))

def read(mode=2):
	inputs = input().strip()
	if mode == 0:
		return inputs
	if mode == 1:
		return inputs.split()
	if mode == 2:
		return list(map(int, inputs.split()))

def write(s='\n'):
	if s is None:
		s = ''
	if isinstance(s, list):
		s = ' '.join(map(str, s))
	s = str(s)
	print(s, end='')
write(main())


def Digitsum(x):
	tot = 0
	if x <= 0:
		return 1
	while x:
		tot += x % 10
		x //= 10
	return tot
(a, b, c) = list(map(int, input().split()))
ans = []
for i in range(0, 82):
	x = b * i ** a + c
	if 0 < x < 10 ** 9 and i == Digitsum(x):
		ans.append(x)
print(len(ans))
print(' '.join(map(str, sorted(ans))))


(a, b, c) = map(int, input().split())

def sum_of_dig(n):
	if n < 0:
		return 0
	s = 0
	n = str(n)
	for i in n:
		s += int(i)
	return s
arr = []
for d in range(1, 82):
	num = pow(d, a)
	x = b * num + c
	if d == sum_of_dig(x) and x > 0 and (x < pow(10, 9)):
		arr.append(str(x))
print(len(arr))
print(' '.join(arr))


def ca(n):
	sum = 0
	while n > 0:
		sum += int(n % 10)
		n = int(n / 10)
	return sum
(a, b, c) = map(int, input().split())
arr = []
for i in range(1, 82):
	var = b * i ** a + c
	if var <= 10 ** 9 and ca(var) == i:
		arr.append(var)
print(len(arr))
print(*arr)


(a, b, c) = map(int, input().split())
ans = []
for i in range(1, 82):
	p = i ** a * b + c
	if p >= 0 and sum(list(map(int, list(str(p))))) == i and (p <= 10 ** 9):
		ans.append(p)
print(len(ans))
print(*ans)


(a, b, c) = map(int, input().split())
(s, q) = (1, [])
while b * s ** a + c < 1:
	s += 1
while s < 82:
	t = str(b * s ** a + c)
	if len(t) > 9:
		break
	if sum(map(int, t)) == s:
		q.append(t)
	s += 1
print(len(q))
print(' '.join(q))


(a, b, c) = map(int, input().split())
ans = []
for i in range(1, 82):
	x = b * pow(i, a) + c
	cnt = 0
	for j in str(x):
		try:
			cnt += int(j)
		except:
			break
	if cnt == i and x <= 10 ** 9:
		ans.append(x)
print(len(ans))
print(*ans)


x = input()
arr = x.split(' ')
a = int(arr[0])
b = int(arr[1])
c = int(arr[2])
ans = set()
for i in range(1, 82):
	temp = b * i ** a + c
	temp1 = 0
	temp2 = temp
	while temp > 0:
		temp1 = temp1 + int(temp % 10)
		temp = int(temp / 10)
	if temp2 > 0 and temp2 < 1000000000 and (temp1 == i):
		ans.add(temp2)
print(len(ans))
answer = sorted(ans)
if len(ans) != 0:
	for i in answer:
		print(i, '', end='')


def scan(type):
	return list(map(type, input().split()))
(a, b, c) = scan(int)

def digitSum(x):
	if x // 10 == 0:
		return x % 10
	return x % 10 + digitSum(x // 10)
ans = []
for s in range(1, 82):
	x = b * s ** a + c
	if x > 0 and x < 10 ** 9 and (digitSum(x) == s):
		ans.append(x)
print(len(ans))
print(*ans)


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

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		import os
		self.os = os
		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 = self.os.read(self._fd, max(self.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 = self.os.read(self._fd, max(self.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:
			self.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')
import time
start_time = time.time()
import collections

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

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

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

def getStr():
	return input()

def listStr():
	return list(input())

def sum_digs(x):
	return sum([int(s) for s in str(x)])

def solve():
	(A, B, C) = getInts()
	ans = []
	for i in range(1, 81):
		val = B * pow(i, A) + C
		if 0 < val < 10 ** 9 and sum_digs(val) == i:
			ans.append(val)
	print(len(ans))
	if ans:
		ans.sort()
		print(*ans)
solve()


def f(y):
	m = 0
	while y > 0:
		m += y % 10
		y = y // 10
	return m
(a, b, c) = map(int, input().split())
ans = []
x = 1
while x < 82:
	k = b * x ** a + c
	if k < 10 ** 9 and f(k) == x:
		ans.append(k)
	x += 1
print(len(ans))
if len(ans):
	print(*ans)


(a, b, c) = map(int, input().split())
A = []
for i in range(1, 82):
	A.append(i ** a)
B = []
for i in A:
	y = b * i + c
	if y > 0 and sum(list(map(int, list(str(y))))) ** a == i and (y < 10 ** 9):
		B.append(y)
print(len(B))
for i in B:
	print(i, end=' ')


(a, b, c) = list(map(int, input().split()))
sx = 1
resitve = []

def s(x):
	return sum(map(int, list(str(x))))
while sx <= 81:
	rez = sx ** a * b + c
	if rez > 10 ** 9:
		break
	if rez > 0 and rez < 10 ** 9 and (s(rez) == sx):
		resitve.append(rez)
	sx += 1
print(len(resitve))
if len(resitve) > 0:
	print(' '.join(map(str, sorted(resitve))))


ID = input().split()
a = int(ID[0])
b = int(ID[1])
c = int(ID[2])
ans = []
for i in range(1, 82, 1):
	x = b * i ** a + c
	if x > 0 and x < 1000000000:
		y = x
		z = 0
		while y > 0:
			z += y % 10
			y //= 10
		if z == i:
			ans.append(x)
print(len(ans))
for x in ans:
	print(x, end=' ')


import math

def s(x):
	ans = 0
	while x > 0:
		ans += x % 10
		x //= 10
	return ans
(a, b, c) = [int(x) for x in input().split()]
ans = []
for i in range(81):
	y = i + 1
	x = b * pow(y, a) + c
	if x < pow(10, 9) and s(x) == y:
		ans.append(x)
ans.sort()
print(len(ans))
if len(ans) > 0:
	print(' '.join((str(x) for x in ans)))


import sys, threading, os.path
import collections, heapq, math, bisect
import string
from platform import python_version
import itertools
sys.setrecursionlimit(10 ** 6)
threading.stack_size(2 ** 27)

def scompute(x):
	str1 = str(x)
	sum = 0
	for c in str1:
		sum += int(c)
	return sum

def main():
	if os.path.exists('input.txt'):
		input = open('input.txt', 'r')
	else:
		input = sys.stdin
	(a, b, c) = list(map(int, input.readline().split()))
	lis = []
	for i in range(1, 100000):
		lis.append((i, b * pow(i, a) + c))
	sol = []
	for (x, y) in lis:
		if y > 0 and y < 1000000000 and (scompute(y) == x):
			sol.append(y)
	if len(lis) == 0:
		output = 0
	else:
		output = str(len(sol))
		output += '\n'
		output += ' '.join(map(str, sol))
	if os.path.exists('output.txt'):
		open('output.txt', 'w').writelines(str(output))
	else:
		sys.stdout.write(str(output))
main()


(a, b, c) = map(int, input().split())
lim = 10 ** 9
arr = []
for i in range(1, 91):
	x = b * i ** a + c
	s = sum(map(int, str(abs(x))))
	if s == i and x > 0 and (x < lim):
		arr.append(x)
print(len(arr))
print(*arr)


X_MAX = 999999999
SUM_MAX = 81

def sum_decimals(number):
	return sum(map(int, list(str(number))))

def main():
	(a, b, c) = list(map(int, input().split()))
	solutions = []
	for sum_digits in range(1, SUM_MAX + 1):
		x = b * sum_digits ** a + c
		if X_MAX >= x > 0 and sum_decimals(x) == sum_digits:
			solutions.append(x)
	print(len(solutions))
	if len(solutions) != 0:
		print(' '.join(map(str, solutions)))
main()


import math

def s(x):
	sum = 0
	while x > 0:
		sum += x % 10
		x //= 10
	return sum
(a, b, c) = map(int, input().split())
ans = []
for i in range(82):
	x = b * i ** a + c
	if x > 0 and x < 10 ** 9 and (s(x) == i):
		ans.append(x)
print(len(ans))
if len(ans) > 0:
	for x in ans:
		print(x, end=' ')


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

def sum_d(n):
	ans = 0
	while n > 0:
		ans += n % 10
		n //= 10
	return ans
(a, b, c) = map(int, input().split())
ans = []
cnt = 0
for t in range(1, 82):
	z = b * power(t, a) + c
	if z > 0 and z < 1000000000:
		if sum_d(z) == t:
			ans.append(z)
			cnt += 1
print(cnt)
print(*ans)


(a, b, c) = map(int, input().split())

def ns(n):
	p = 0
	c = 0
	while n > 0:
		p += n % 10
		n //= 10
		c += 1
	return (p, c)
t = [0] * 10
sol = []
for i in range(1, 82):
	t = b * i ** a + c
	nss = ns(t)
	if nss[0] == i and nss[1] <= 9:
		sol.append(t)
print(len(sol))
print(*sol)


import sys

def sstevk(n):
	ret = 0
	while n > 0:
		ret += n % 10
		n //= 10
	return ret
(a, b, c) = map(int, sys.stdin.readline().split())
sols = []
for s in range(0, 9 * 9 + 1):
	x = b * s ** a + c
	if x <= 0 or x >= 10 ** 9:
		continue
	if sstevk(x) == s:
		sols.append(x)
sols.sort()
print(len(sols))
print(' '.join((str(x) for x in sols)))


import sys
import math

def main():
	(a, b, c) = map(int, sys.stdin.readline().strip().split()[:3])
	res = []
	for i in range(83):
		x = b * i ** a + c
		if x > 0 and sum(list(map(int, list(str(x))))) == i and (x < 1000000000.0):
			res.append(str(x))
	print(len(res))
	if len(res) != 0:
		print(' '.join(res))
main()


(a, b, c) = map(int, input().split())
l = []

def getSum(n):
	sum = 0
	for digit in str(n):
		sum += int(digit)
	return sum
for i in range(1, 82):
	if b * i ** a + c < 10 ** 9 and b * i ** a + c > 0 and (getSum(b * i ** a + c) == i):
		l.append(b * i ** a + c)
print(len(l))
print(*l)


(a, b, c) = list(map(int, input().split()))
count = 0
arr = []

def s(x):
	m = str(x)
	k = 0
	for i in m:
		k += int(i)
	return k
for y in range(1, 82):
	p = b * pow(y, a) + c
	if p > 0 and p < 10 ** 9:
		if s(p) == y:
			count += 1
			arr.append(p)
print(count)
for x in arr:
	print(x, end=' ')


def digsum(n):
	if n < 0:
		return False
	n = str(n)
	t = 0
	for i in n:
		t += int(i)
	return t
from math import ceil, floor
(a, b, c) = map(int, input().split())
x = []
for i in range(1, 82):
	y = b * i ** a + c
	if digsum(y) == i and 0 < y < 10 ** 9:
		x.append(y)
print(len(x))
x.sort()
print(*x)


def s(i):
	return sum([int(x) for x in str(i)])
x = [int(i) for i in input().split()]
a = x[0]
b = x[1]
c = x[2]
l = []
for k in range(1, 82):
	n = b * k ** a + c
	if n > 0 and n < 1000000000 and (s(n) == k):
		l.append(n)
print(len(l))
for j in l:
	print(j, end=' ')


(a, b, c) = map(int, input().split())
ans = []
for s in range(1, 100001):
	x = b * s ** a + c
	gg = 0
	if x <= 0:
		continue
	for i in str(x):
		gg += int(i)
	if gg == s and x <= 10 ** 9:
		ans.append(x)
print(len(ans))
for i in ans:
	print(i, end=' ')


import sys, math
from collections import deque, defaultdict
import operator as op
from functools import reduce
sys.setrecursionlimit(10 ** 6)
I = sys.stdin.readline

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

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

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

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer // denom

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

def divi(n):
	ans = []
	for i in range(2, int(n ** 0.5) + 1):
		if n % i == 0:
			ans.append((i, n // i))
	return ans

def f(x):
	c = 0
	while x != 0:
		c += x % 10
		x //= 10
	return c

def main():
	ans = []
	(a, b, c) = mi()
	for i in range(1, 82):
		e = b * i ** a + c
		if e > 0 and e < 10 ** 9 and (i == f(e)):
			ans.append(e)
	if len(ans) == 0:
		print(0)
	else:
		print(len(ans))
		print(*ans)
main()


(a, b, c) = list(map(int, input().split()))
l = []
for s in range(1, 82):
	my_x = b * s ** a + c
	if my_x > 0:
		if s == sum(list(map(int, list(str(my_x))))):
			if my_x < 10 ** 9:
				l.append(my_x)
if len(l):
	print(len(l))
	for i in l:
		print(i, end=' ')
else:
	print(0)


(a, b, c) = list(map(int, input().split()))
limit = 10 ** 9

def sum_num(tmp):
	ret = 0
	while tmp > 0:
		ret += tmp % 10
		tmp //= 10
	return ret
p = []
for i in range(1, 82):
	tmp = b * i ** a + c
	if sum_num(tmp) == i and tmp <= limit:
		p.append(tmp)
print(len(p))
for i in p:
	print(i, end=' ')
print()


MAX = 10 ** 9
(a, b, c) = map(int, input().split())
R = []
for s in range(1, 81):
	x = b * s ** a + c
	if x > 0 and x < MAX:
		if sum(map(int, str(x))) == s:
			R.append(x)
print(len(R))
if R:
	print(' '.join(map(str, R)))


(a, b, c) = map(int, input().split())
L = []
for i in range(1, 82):
	val = b * i ** a + c
	check = 0
	if val > 0 and val < 10 ** 9:
		s = str(val)
		for j in s:
			check += int(j)
		if check == i:
			L.append(val)
if len(L) == 0:
	print(0)
else:
	print(len(L))
	print(*L)


def num(x):
	s = 0
	while x > 0:
		s += x % 10
		x //= 10
	return s
(a, b, c) = map(int, input().split())
res = []
for i in range(1, 81):
	aux = b * i ** a + c
	if num(aux) == i and aux < 10 ** 9:
		res.append(aux)
print(len(res))
res.sort()
print(*res)


__author__ = 'Ученик'
(a, b, c) = map(int, input().split(' '))
ans = list()
for i in range(82):
	x = b * i ** a + c
	y = x
	sm = 0
	if x <= 0 or x >= 1000000000:
		continue
	while y > 0:
		sm += y % 10
		y //= 10
	if sm == i:
		ans.append(x)
x = 0
for i in ans:
	x += 1
print(x)
for i in ans:
	print(i, end=' ')


def getSum(n):
	sum = 0
	while n > 0:
		sum += int(n % 10)
		n = int(n / 10)
	return sum
import sys
(a, b, c) = map(int, sys.stdin.readline().split())
ans = []
for i in range(1, 82):
	if getSum(b * i ** a + c) == i and b * i ** a + c < 10 ** 9 and (b * i ** a + c > 0):
		ans.append(b * i ** a + c)
print(len(ans))
print(*ans)


def sumDigit(n):
	ans = 0
	if n <= 0:
		return ans
	while n:
		ans += n % 10
		n //= 10
	return ans
(a, b, c) = map(int, input().split())
ans = []
can = 82
for i in range(1, 82):
	temp = b * int(pow(i, a)) + c
	if sumDigit(temp) == i and temp > 0 and (temp < int(1000000000.0)):
		ans.append(temp)
print(len(ans))
for it in ans:
	print(it, end=' ')


def s(n):
	n = str(n)
	sum = 0
	for i in range(0, len(n)):
		sum += int(n[i])
	return sum
(a, b, c) = map(int, input().split())
ar = []
for i in range(1, 82):
	ans = b * i ** a + c
	if ans < 0:
		pass
	elif s(ans) == i and ans <= 10 ** 9:
		ar.append(b * i ** a + c)
print(len(ar))
print(*ar)


def sum_num(a):
	s = 0
	a = abs(a)
	while a:
		s += a % 10
		a //= 10
	return s
(a, b, c) = map(int, input().split())
res = []
for i in range(1, 82):
	if sum_num(b * i ** a + c) == i and b * i ** a + c > 0 and (b * i ** a + c < 1000000000.0):
		res.append(b * i ** a + c)
print(len(res))
print(*res)


def digitsum(x):
	sm = 0
	while x:
		sm += x % 10
		x //= 10
	return sm

def power(x, a):
	if a == 0:
		return 1
	z = power(x, a // 2)
	z *= z
	if a % 2:
		z *= x
	return z
[a, b, c] = list(map(int, input().split()))
count = 0
val = []
for sm in range(1, 82):
	num = b * power(sm, a) + c
	if 0 < num < 10 ** 9 and digitsum(num) == sm:
		count += 1
		val.append(num)
print(count)
for no in val:
	print(no, end=' ')


import math
(a, b, c) = map(int, input().split())
ans = []
for sx in range(100):
	x = int(b * pow(sx, a) + c)
	y = int(x)
	k = 0
	while y > 0:
		k += y % 10
		y = int(y / 10)
	if k == sx and x < pow(10, 9) and (x > 0):
		ans.append(x)
print(len(ans))
for item in ans:
	print(item, end=' ')
print()


def digits(x):
	x = str(x)
	ans = 0
	for i in range(len(x)):
		ans += int(x[i])
	return ans

def solve(a, b, c):
	track = []
	for i in range(1, 82):
		num = b * i ** a + c
		if num < 0:
			continue
		if digits(num) == i and num < int(1000000000.0):
			track.append(num)
	print(len(track))
	print(' '.join(map(str, track)))
(a, b, c) = map(int, input().split())
solve(a, b, c)


import math

def func(n):
	sum = 0
	while n > 0:
		sum += n % 10
		n = n // 10
	return sum
(a, b, c) = map(int, input().split())
l = []
for i in range(1, 82):
	num = b * pow(i, a) + c
	if num >= pow(10, 9):
		break
	if func(num) == i:
		l.append(num)
print(len(l))
print(*l, end=' ')


(a, b, c) = map(int, input().split())
ans = []
for i in range(82):
	num = b * i ** a + c
	if 1 <= num <= 10 ** 9 and sum(map(int, str(num))) == i:
		ans.append(str(num))
print(len(ans))
print(' '.join(ans))


(a, b, c) = list(map(int, input().split()))
ans = []
for s in range(1, 81 + 1):
	x = b * s ** a + c
	if x >= 0 and x < 10 ** 9:
		sx = sum(map(int, list(str(x))))
		if sx == s:
			ans.append(x)
ans.sort()
print(len(ans))
print(' '.join(map(str, ans)))


def sod(val):
	re = 0
	while val != 0:
		re += val % 10
		val = val // 10
	return re
(a, b, c) = map(int, input().split())
l = []
for i in range(1, 82):
	res = b * i ** a + c
	if res > 0 and res < 10 ** 9:
		if sod(res) == i:
			l.append(res)
print(len(l))
l.sort()
for i in l:
	print(i, end=' ')


class CodeforcesTask460BSolution:

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

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

	def process_task(self):
		solutions = set()
		for y in range(1, 100):
			sol = self.a_b_c[1] * y ** self.a_b_c[0] + self.a_b_c[2]
			if 0 < sol <= 10 ** 9 + 1:
				if sum([int(x) for x in str(sol)]) == y:
					solutions.add(sol)
		solutions = sorted(list(solutions))
		self.result = '{0}\n{1}'.format(len(solutions), ' '.join([str(x) for x in solutions]))

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


(a, b, c) = map(int, input().split())

def digitsSum(n):
	res = 0
	while n:
		res += n % 10
		n //= 10
	return res

def f(s):
	return b * s ** a + c
ret = []
for s in range(1, 82):
	x = f(s)
	if 0 < x < 10 ** 9 and digitsSum(x) == s:
		ret.append(x)
print('%d\n%s' % (len(ret), ' '.join(map(str, ret))))


from sys import stdin, stdout
input = stdin.readline
import math, bisect
(a, b, c) = map(int, input().split())
ans = []
for i in range(1, 82):
	temp = b * pow(i, a) + c
	t1 = temp
	st1 = 0
	if t1 > 0 and temp <= 1000000000:
		while t1:
			st1 += t1 % 10
			t1 = t1 // 10
		if st1 == i:
			ans.append(temp)
print(len(ans))
print(*ans)


def s(a, b, c):
	l = []
	for i in range(1, 82):
		v = b * i ** a + c
		if v > 1000000000:
			break
		vcopy = v
		val = 0
		while v > 0:
			val += v % 10
			v //= 10
		if val == i:
			l.append(vcopy)
	print(len(l))
	for i in l:
		print(i, end=' ')
(a, b, c) = map(int, input().split())
s(a, b, c)


(a, b, c) = map(int, input().split(' '))
ans = []
for s in range(1, 81):
	x = b * s ** a + c
	if x < 1 or x >= 10 ** 9:
		continue
	z = len(str(x))
	d = 0
	for i in range(z):
		d += int(str(x)[i])
	if d == s:
		ans.append(x)
print(len(ans))
for i in range(len(ans)):
	print(ans[i], end=' ')


(a, b, c) = map(int, input().split())

def S(x: int):
	return sum(map(int, str(abs(x))))
sols = []
for s in range(1, 81):
	x = b * s ** a + c
	if s == S(x) and x < 1000000000.0 and (x > 0):
		sols.append(x)
print(len(sols))
[print(i, end=' ') for i in sols]


(a, b, c) = map(int, input().split())
i = 0

def summ_digit(number):
	i = 0
	summ = 0
	num = str(number)
	while len(num) > i:
		summ += int(num[i])
		i += 1
	return summ
c1 = [0] * 81
for s in range(1, 82):
	n = b * s ** a + c
	if n > 0 and summ_digit(n) == s and (n < 10 ** 9):
		c1[i] = n
		i += 1
print(i)
j = 0
while i > j:
	print(c1[j], end=' ')
	j += 1


def getsum(num):
	sum = 0
	while num > 0:
		rem = num % 10
		sum += rem
		num = int(num / 10)
	return sum
arr = list(map(int, input().split()))
a = arr[0]
b = arr[1]
c = arr[2]
ans = []
for i in range(100):
	x = b * i ** a + c
	if x <= 0 or x >= 1000000000:
		continue
	sm = getsum(abs(x))
	if sm == i:
		ans.append(x)
print(len(ans))
for i in ans:
	print(i, end=' ')


(a, b, c) = [int(ch) for ch in input().split()]
sol = []
for i in range(0, 82):
	x = str(b * i ** a + c)
	s = sum([int(ord(ch) - ord('0')) for ch in x])
	if s == i and int(x) > 0 and (int(x) < 10 ** 9):
		sol.append(x)
print(len(sol))
for el in sol:
	print(el, end=' ')


from itertools import combinations

def cal(cnt):
	e = 0
	while cnt > 0:
		e += cnt % 10
		cnt = cnt // 10
	return e
(a, b, c) = map(int, input().split())
ans = set()
for i in range(1, 82):
	som = i
	cnt = b * som ** a + c
	csom = cal(cnt)
	if csom == som:
		if cnt > 0 and cnt < 10 ** 9:
			ans.add(cnt)
ans = list(ans)
ans.sort()
print(len(ans))
print(*ans)


def s(x):
	x = list(str(x))
	sum = 0
	for i in range(0, len(x)):
		sum += int(x[i])
	return sum

def find_X(a, b, c):
	ans = []
	s_x_max = s(999999999)
	for S in range(1, s_x_max):
		X = S ** a * b + c
		if X < 10 ** 9 and X > 0:
			if s(X) == S:
				ans.append(X)
	print(len(ans))
	if ans:
		print(' '.join(map(str, ans)))

def main():
	(a, b, c) = map(int, input().split())
	find_X(a, b, c)
main()


ans = []
(a, b, c) = list(map(int, input().split()))

def sumDig(x):
	ret = 0
	if x <= 0:
		return 100500
	while x:
		ret += x % 10
		x //= 10
	return ret
for s in range(1, 90):
	val = b * pow(s, a) + c
	if 0 < val < 10 ** 9 and sumDig(val) == s:
		ans.append(val)
print(len(ans))
print(' '.join(map(str, sorted(ans))))


import math

def sod(n):
	s = 0
	while n != 0:
		s += n % 10
		n = n // 10
	return s
(a, b, c) = map(int, input().split())
ans = []
for i in range(1, 82):
	f = b * math.pow(i, a) + c
	s = sod(abs(f))
	if s == i and f > 0 and (f < 1000000000):
		ans.append(f)
if len(ans) > 0:
	print(len(ans))
	for i in range(len(ans)):
		print(int(ans[i]), end=' ')
else:
	print('0')


def sum_numbers(number):
	s = 0
	while number > 0:
		(number, r) = divmod(number, 10)
		s += r
	return s

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 reshenie(A, B, C):
	result = list()
	for i in range(1, 82):
		x = B * power(i, A) + C
		if 0 < x < 10 ** 9 and i == sum_numbers(x):
			result.append(x)
	return result
(c, d, e) = [int(j) for j in input().split()]
print(len(reshenie(c, d, e)))
print(*reshenie(c, d, e))


def s(x):
	tmp = x
	ans = 0
	while tmp > 0:
		ans += tmp % 10
		tmp //= 10
	return ans

def main(a, b, c):
	ans = []
	for i in range(82):
		x = b * i ** a + c
		if 0 < x < 10 ** 9 and s(x) == i:
			ans.append(x)
	print(len(ans))
	for i in ans:
		print(i, end=' ')
(a, b, c) = map(int, input().split())
main(a, b, c)


(a, b, c) = [int(i) for i in input().split()]
ans = set()
for i in range(1, 10):
	for j in range(1, 9 * i + 1):
		x = b * pow(j, a) + c
		if x > 0 and len(str(x)) == i and (sum([int(k) for k in str(x)]) == j):
			ans.add(x)
print(len(ans))
if ans:
	print(' '.join([str(i) for i in sorted(list(ans))]))


import math

def digit_sum(n):
	su = 0
	while n:
		su += n % 10
		n /= 10
		n = math.floor(n)
	return su

def main():
	(a, b, c) = [int(x) for x in input().split()]
	ans = []
	for i in range(1, 82):
		term = math.floor(b * math.pow(i, a) + c)
		if term < 1000000000 and term > 0 and (digit_sum(term) == i):
			ans.append(str(term))
	length = len(ans)
	print(length)
	if length:
		print(' '.join(ans))
main()


def SD(a):
	ans = 0
	temp = a
	while temp > 0:
		ans += temp % 10
		temp //= 10
	return ans
inp = input().split()
a = int(inp[0])
b = int(inp[1])
c = int(inp[2])
l = []
for i in range(1, 82, 1):
	curr = b * i ** a + c
	if SD(curr) == i:
		l.append(curr)
l2 = []
for i in l:
	if i > 0 and i < 1000000000:
		l2.append(i)
print(len(l2))
for i in l2:
	print(i, end=' ')


(a, b, c) = list(map(int, input().split()))
ans = []

def sum2(n):
	return sum([int(x) for x in str(n)])
for s in range(1, 82):
	x = b * s ** a + c
	if x > 0 and sum2(x) == s and (x < 10 ** 9):
		ans.append(x)
print(len(ans))
print(' '.join(map(str, ans)))


def sum_of_digs(num):
	sum = 0
	num_string = str(num)
	for dig in num_string:
		sum = sum + int(dig)
	return sum
inpt = input()
l = inpt.split()
a = int(l[0])
b = int(l[1])
c = int(l[2])
sol = []
j = 0
max_num = 1000000000
for i in range(1, 1000):
	num = b * i ** a + c
	if num < max_num:
		if num > 0:
			if sum_of_digs(num) == i:
				sol.append(num)
				j += 1
print(j)
if j > 0:
	w = 1
	while w <= j:
		print(sol[w - 1], end=' ')
		w += 1


load = [int(i) for i in input().split()]

def digit_sum(x):
	res = 0
	while x > 0:
		res += x % 10
		x //= 10
	return res
a = load[0]
b = load[1]
c = load[2]
sol = []
for i in range(1, 90):
	tmp = b * i ** a + c
	if i == digit_sum(tmp) and tmp < 10 ** 9:
		sol.append(tmp)
print(len(sol))
buff = ''
for i in range(len(sol)):
	buff += str(sol[i]) + ' '
print(buff)


def sum(N):
	x = N % 10
	N = int(N / 10)
	while N > 0:
		x = x + N % 10
		N = int(N / 10)
	return x
[a, b, c] = input().split(' ')
a = int(a)
b = int(b)
c = int(c)
anss = []
for N in range(1, 81):
	if (sum(N ** a * b + c) == N) & (N ** a * b + c < 10 ** 9) & (0 < N ** a * b + c):
		anss = anss + [str(N ** a * b + c)]
print(len(anss))
if len(anss) != 0:
	print(' '.join(anss))


(a, b, c) = map(int, input().split(' '))
L = []
for s in range(1, 82):
	x = b * s ** a + c
	t = str(x)
	if 0 < x < 10 ** 9 and sum(map(int, t)) == s:
		L.append(t)
print(len(L), ' '.join(L), sep='\n')


def bnp(bs, pw):
	res = 1
	while pw:
		if pw & 1:
			res *= bs
			res %= int(1000000000.0 + 7)
		bs *= bs
		bs %= int(1000000000.0 + 7)
		pw //= 2
	return res % int(1000000000.0 + 7)
(a, b, c) = map(int, input().split())
res = []
for n in range(1, 82):
	u = b * bnp(n, a) + c
	if 0 <= u < 1000000000.0:
		if sum(list(map(int, str(u)))) == n:
			res.append(u)
print(len(res))
print(*res)


import math
(a, b, c) = map(int, input().split())
ans = []
for i in range(1, 82):
	x = b * i ** a + c
	if i == sum(list(map(int, str(abs(x))))) and x < 10 ** 9 and (x > 0):
		ans.append(x)
print(len(ans))
if len(ans):
	print(*ans)


import sys

def s(n):
	aux = str(n)
	suma = 0
	for digit in aux:
		suma += int(digit)
	return suma
(a, b, c) = map(int, sys.stdin.readline().strip().split(' '))
values = []
for i in range(1, 82):
	x = b * i ** a + c
	if x > 0 and x < 1000000000.0:
		if s(x) == i:
			values.append(str(x))
n = len(values)
salida = ' '.join(values)
print(n)
if n > 0:
	print(salida)


def s(x):
	r = 0
	while x:
		r += x % 10
		x //= 10
	return r
(a, b, c) = map(int, input().split())
arr = []
for d in range(1, 100):
	x = b * d ** a + c
	if 0 < x < 1000000000.0 and s(x) == d:
		arr.append(x)
arr.sort()
print(len(arr))
print(*arr)


from sys import stdin, stdout
stdin.readline

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

def it():
	return int(stdin.readline().strip())
from collections import defaultdict as dd, Counter as C, deque
from math import ceil, gcd, sqrt, factorial, log2, floor
from bisect import bisect_right as br, bisect_left as bl
import heapq

def match(t):
	ans = 0
	while t:
		ans += t % 10
		t //= 10
	return ans
n = 10 ** 9
(a, b, c) = mp()
v = []
for i in range(1, 82):
	t = b * pow(i, a) + c
	if t < n and t > 0 and (match(t) == i):
		v.append(t)
print(len(v))
print(*v)


def ds(x):
	return sum([int(c) for c in str(abs(x))])
(a, b, c) = map(int, input().split())
S = [b * s ** a + c for s in range(82)]
R = sorted([i for i in range(1, 82) if S[i] > 0 and S[i] < 10 ** 9 and (i == ds(S[i]))])
print(len(R))
print(' '.join([repr(S[i]) for i in R]))


import math
(a, b, c) = map(int, input().split())
count = 0
ans = ''

def findSum(n):
	answ = 0
	while n > 0:
		answ += n % 10
		n = n // 10
	return answ
for i in range(1, 82):
	t = b * i ** a + c
	if t > 0 and t < 1000000000:
		if i == findSum(t):
			count += 1
			ans += str(t) + ' '
print(count)
print(ans)


def s(x):
	res = 0
	while x > 0:
		res += x % 10
		x //= 10
	return res
(a, b, c) = input().split()
a = int(a)
b = int(b)
c = int(c)
ans = []
for sx in range(1, 81):
	x = b * sx ** a + c
	if x < 10 ** 9:
		if sx == s(x):
			ans.append(str(x))
	else:
		break
print(len(ans))
print(' '.join(ans))


def sumd(x):
	res = 0
	while x > 0:
		res += x % 10
		x //= 10
	return res
(a, b, c) = map(int, input().split())
res = []
for s in range(1, 80):
	x = b * pow(s, a) + c
	if x > 0 and x < 10 ** 9 and (sumd(x) == s):
		res.append(x)
print(len(res))
print(*res)


line = input()
a = int(line.split(' ')[0])
b = int(line.split(' ')[1])
c = int(line.split(' ')[2])

def k(a, b, c):
	possibleX = []
	x = 0
	for i in range(81):
		x = b * i ** a + c
		if x > 0 and x < 10 ** 9:
			possibleX.append(x)
	realx = []
	sign = 1
	for x in possibleX:
		tem = list(str(x))
		summ = 0
		for t in tem:
			summ += int(t)
		if x == sign * (b * summ ** a + c):
			realx.append(x)
	length = len(realx)
	print(length)
	if length > 0:
		print(*realx)
k(a, b, c)


import math

def s(x):
	summ = 0
	for i in str(x):
		summ += int(i)
	return summ
(a, b, c) = map(int, input().split())
res = []
for summ in range(1, 82):
	x = b * summ ** a + c
	if 0 < x < 10 ** 9 and s(x) == summ:
		res.append(x)
if res == []:
	print(0)
else:
	print(len(res))
	print(*res)


m = list(input().split())
a = int(m[0])
b = int(m[1])
c = int(m[2])
from math import floor
sl = ''
slc = 0
for i in range(1, 81):
	t = b * i ** a + c
	k = 0
	if t < 1 or t > 999999999:
		continue
	kk = str(t)
	for j in range(len(kk)):
		k += int(kk[j])
	if i == k:
		sl = sl + ' ' + str(t)
		slc += 1
print(slc)
print(sl[1:])


import math

def sum_of_digits(num):
	if num == 0:
		return 0
	else:
		return num % 10 + sum_of_digits(num // 10)
x_values = []
(a, b, c) = [int(i) for i in input().split()]
for s_x in range(1, 82):
	val = int(b * math.pow(s_x, a) + c)
	if 0 < val < 10 ** 9:
		if sum_of_digits(val) == s_x:
			x_values.append(str(val))
print(len(x_values))
print(' '.join(x_values))


(a, b, c) = map(int, input().split())
ans = []
c0 = 0
for i in range(1, 83):
	val = b * pow(i, a) + c
	st = str(val)
	if val < 0 or val >= 1000000000:
		continue
	c1 = 0
	for j in st:
		c1 += int(j)
	if c1 == i:
		ans.append(val)
		c0 += 1
print(c0)
print(*ans)


(a, b, c) = map(int, input().split())
ans = []
for i in range(1, 82):
	t = b * i ** a + c
	if t >= 10 ** 9:
		break
	t1 = t
	s = 0
	while t1 > 0:
		digit = t1 % 10
		s += digit
		t1 //= 10
	if i == s:
		ans.append(t)
print(len(ans))
if ans:
	print(*ans)


from math import *
ans = []
(a, b, c) = map(int, input().split())
for i in range(82):
	x = b * i ** a + c
	if 0 < x < 1000000000 and sum(map(int, list(str(x)))) == i:
		ans.append(x)
print(len(ans))
print(*ans)


(a, b, c) = map(int, input().split())

def sumd(x):
	s = 0
	while x > 0:
		s += x % 10
		x = x // 10
	return s
sol = []
for s in range(1, 82):
	x = b * pow(s, a) + c
	if x > 0 and x < 1000000000 and (sumd(x) == s):
		sol.append(x)
print(len(sol))
for el in sorted(sol):
	print(el, end=' ')


(a, b, c) = input().split(' ')
(a, b, c) = (int(a), int(b), int(c))
lol = []
for i in range(1, 82):
	x = b * i ** a + c
	if x > 0 and x < 10 ** 9:
		y = str(x)
		s = 0
		for j in range(len(y)):
			s += int(y[j])
		if s == i:
			lol.append(x)
print(len(lol))
if len(lol) > 0:
	print(*lol)


def s(x):
	res = 0
	while x > 0:
		res += x % 10
		x //= 10
	return res
(a, b, c) = map(int, input().split())
x = 0
res = []
for x in range(100):
	y = b * x ** a + c
	if 1 <= y < 10 ** 9 and s(y) == x:
		res.append(y)
res.sort()
print(len(res))
for x in res:
	print(x, end=' ')


(a, b, c) = map(int, input().split())
count = 0
ans = []
for i in range(1, 82):
	x = b * i ** a + c
	if 0 < x < 1000000000.0:
		if sum([int(j) for j in str(x)]) == i:
			count += 1
			ans.append(x)
print(count)
if count > 0:
	print(' '.join([str(i) for i in ans]))


import sys
import math

def mf(val):
	res = 0
	for i in val[::-1]:
		res += int(i)
	return res
(a, b, c) = [int(x) for x in sys.stdin.readline().split()]
res = []
for i in range(1, 82):
	t = int(b * math.pow(i, a) + c)
	if t >= 0 and t <= 1000000000:
		v = str(t)
		if mf(v) == i:
			res.append(v)
print(len(res))
print(' '.join(res))


def sumdigits(x):
	if x < 10:
		return x
	return sumdigits(x // 10) + x % 10
(a, b, c) = [int(a) for a in input().split()]
solutions = []
for i in range(82):
	x = b * i ** a + c
	if 0 < x and x < 10 ** 9 and (sumdigits(x) == i):
		solutions.append(x)
print(len(solutions))
if solutions:
	print(' '.join(map(str, solutions)))


(a, b, c) = map(int, input().split())
out = []
for i in range(1, 82):
	x = b * pow(i, a) + c
	if x > 0 and sum(list(map(int, list(str(x))))) == i:
		if x > 0 and x < 1000000000.0:
			out.append(x)
out.sort()
if out:
	print(len(out))
	print(*out)
else:
	print(0)


import math, sys, bisect, heapq, os
from collections import defaultdict, Counter, deque
from itertools import groupby, accumulate
from functools import lru_cache
int1 = lambda x: int(x) - 1

def input():
	return sys.stdin.readline().rstrip('\r\n')
aj = lambda : list(map(int, input().split()))

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

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

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

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

def solve():
	(a, b, c) = aj()
	maxi = 10 ** 9
	Ans = []
	for i in range(82 + 5):
		x = b * i ** a + c
		if x < maxi and x > 0:
			v = list(map(int, [*str(x)]))
			if sum(v) == i:
				Ans.append(x)
	print(len(Ans))
	if Ans:
		Ans.sort()
		print(*Ans)
try:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
except:
	pass
solve()


(a, b, c) = map(int, input().split(' '))
ans = []
for s in range(1, 82):
	x = b * s ** a + c
	if 0 < x < 10 ** 9 and sum(map(int, str(x))) == s:
		ans.append(x)
print(len(ans), str(ans).replace(',', '')[1:-1], sep='\n')


(a, b, c) = input().split()
(a, b, c) = (int(a), int(b), int(c))

def sum(a):
	s = 0
	while a != 0:
		s += a % 10
		a = int(a / 10)
	return s
ans = []
for i in range(1, 82):
	num = b * pow(i, a) + c
	if sum(num) == i and num > 0 and (num < 1000000000):
		ans.append(num)
print(len(ans))
for i in ans:
	print(i, end=' ')


def sumdig(n):
	if n < 0:
		return pow(10, 18)
	else:
		a = 0
		for x in str(n):
			a += int(x)
		return a
(a, b, c) = map(int, input().split(' '))
sums = []
for sx in range(1, 81):
	if sumdig(b * sx ** a + c) == sx:
		sums.append(sx)
total = 0
string = ''
for element in sums:
	if 0 < b * element ** a + c < 10 ** 9:
		string += str(b * element ** a + c)
		string += ' '
		total += 1
print(total)
if total != 0:
	print(string.strip())


def sd(n):
	val = 0
	while n > 0:
		val += n % 10
		n //= 10
	return val
(a, b, c) = (int(x) for x in input().split())
l = []
for s in range(1, 82):
	cur = b * s ** a + c
	if cur > 0 and cur < 10 ** 9 and (sd(cur) == s):
		l.append(cur)
l.sort()
print(len(l))
print(' '.join((str(x) for x in l)))


(a, b, c) = [int(x) for x in input().split()]
ans = []
for i in range(1, 82):
	x = b * pow(i, a) + c
	n = x
	ds = 0
	while n > 0:
		ds += n % 10
		n = n // 10
	if ds == i and x > 0 and (x < 1000000000):
		ans.append(x)
print(len(ans))
print(*ans)


(a, b, c) = map(int, input().split())
lst = []

def S(x):
	if x < 0:
		return
	s = 0
	while x:
		s += x % 10
		x //= 10
	return s
for s in range(1, 82):
	x = b * s ** a + c
	if s == S(x) and x < 10 ** 9:
		lst.append(x)
print(len(lst))
print(*lst)


(a, b, c) = map(int, input().split())
ans = []
for i in range(1, 82):
	t = b * i ** a + c
	if t > 0 and t <= 10 ** 9:
		k = t
		s = 0
		while k:
			s += k % 10
			k //= 10
		if s == i:
			ans.append(t)
print(len(ans))
print(*ans)


import math
(a, b, c) = map(int, input().split())
res = []
for n in range(1, 81):
	x = b * n ** a + c
	if x > 0 and x < 1000000000.0 and (sum(map(int, list(str(x)))) == n):
		res.append(x)
res = sorted(res)
print(len(res))
print(*res)


def main():
	(a, b, c) = map(int, input().strip().split())
	res = []
	for sx in range(1, 82):
		x = b * sx ** a + c
		if 0 < x < 1000000000 and sum(map(int, str(x))) == sx:
			res.append(x)
	print(len(res))
	if res:
		print(*sorted(res))
main()


def main():
	(a, b, c) = [int(i) for i in input().split()]
	result = []
	for S in range(1, 82):
		f = b * S ** a + c
		if 0 < f < 10 ** 9 and sum((int(i) for i in str(f))) == S:
			result.append(str(f))
	print(len(result))
	print(' '.join(result))
main()


(a, b, c) = map(int, input().split())
MAXNUM = 10 ** 9 + 1
ans = ''
ansCount = 0

def s(x):
	result = 0
	while x > 0:
		result += x % 10
		x = x // 10
	return result
for i in range(1, 82):
	num = b * i ** a + c
	if num > 0 and num < MAXNUM and (s(num) == i):
		ans = ans + str(num) + ' '
		ansCount += 1
print(ansCount)
if ansCount > 0:
	print(ans)


(a, b, c) = map(int, input().split())
ans = []
for i in range(1, 91, 1):
	x = b * pow(i, a) + c
	if x > 999999999:
		break
	if x > 0:
		var = x
		fval = 0
		while var > 0:
			fval += var % 10
			var //= 10
		if fval == i:
			ans.append(x)
print('{}'.format(len(ans)))
for i in range(len(ans)):
	if i == 0:
		print('{}'.format(ans[i]), end='')
	else:
		print(' {}'.format(ans[i]), end='')
if len(ans) > 0:
	print()


def calc_sum(x):
	sum = 0
	while x > 0:
		sum += x % 10
		x //= 10
	return sum
(a, b, c) = map(int, input().split(' '))
ans = []
for sum in range(1, 81):
	x = b * sum ** a + c
	if calc_sum(x) == sum and x < 10 ** 9:
		ans.append(x)
print(len(ans))
for item in ans:
	print(item, end=' ')


[a, b, c] = [int(x) for x in input().split()]
ans = []
for i in range(1, 82):
	x = b * i ** a + c
	if x >= 1000000000:
		continue
	sum = 0
	while x > 0:
		sum += x % 10
		x //= 10
	if sum == i:
		ans.append(b * i ** a + c)
ans.sort()
print(len(ans))
print(*ans)


def summ(num):
	return sum(map(int, list(str(num))))
(a, b, c) = map(int, input().split())
lst = []
for i in range(1, 82):
	x = b * pow(i, a) + c
	if x > 0:
		if x < 10 ** 9 and summ(x) == i:
			lst.append(x)
lst.sort()
print(len(lst))
if lst != []:
	print(*lst)


def digisum(x):
	ans = 0
	while x:
		ans += x % 10
		x = x // 10
	return ans
fin = []
count = 0
(a, b, c) = map(int, input().split())
for i in range(1, 82, 1):
	y = b * i ** a + c
	if y > 0 and y < 1000000000:
		z = digisum(y)
		if z == i:
			count += 1
			fin.append(y)
if len(fin) == 0:
	print('0')
else:
	print(count)
	for i in range(count):
		print(fin[i], end=' ')


def s(x):
	return sum((int(c) for c in str(x)))
(a, b, c) = [int(x) for x in input().split()]
ans = []
for i in range(1, 9 * 9):
	x = b * i ** a + c
	if x <= 0 or x >= 10 ** 9:
		continue
	if s(x) == i:
		ans.append(str(x))
print(len(ans))
print(' '.join(ans))