#include <bits/stdc++.h>
using namespace std;
long long int mad = 1e9 + 7;
vector<vector<long long int>> matrix, graph, result;
vector<long long int> visited, stck;
long long int n, m, k, cc, element;
vector<long long> fact;
bool cycle = false;
long long int dx[] = {1, -1, 0, 0};
long long int dy[] = {0, 0, 1, -1};
bool possible(long long int x, long long int y) {
  if (x >= n || x < 0 || y < 0 || y >= m || matrix[x][y] != 'X') return false;
  return true;
}
class event {
 public:
  long long int index;
  long long int value;
};
long long int binarysearch(vector<long long int>& kan, long long int value) {
  long long int r = kan.size() - 1, l = 0;
  long long int ans = -1;
  while (l <= r) {
    long long int mid = (l + r) >> 1;
    if (kan[mid] == value) return 2;
    if (kan[mid] > value) {
      r = mid - 1;
    } else
      l = mid + 1;
  }
  return -1;
}
bool mysort(event a, event b) {
  if (a.value == b.value) return a.index > b.index;
  return a.value < b.value;
}
void infact() {
  fact[0] = 1;
  fact[1] = 1;
  for (long long int i = 1; i <= n; i++) {
    fact[i] = (i * fact[i - 1]) % mad;
  }
  return;
}
long long power(long long den, long long deg) {
  if (!deg) return 1 % mad;
  if (deg & 1) return power(den, deg - 1) * den % mad;
  long long res = power(den, deg >> 1);
  return (res * res) % mad;
}
long long ways(long long int n, long long int i) {
  long long num = fact[n];
  long long den = (fact[i] * fact[n - i]) % mad;
  den = power(den, mad - 2);
  return (num * den) % mad;
}
bool check(long long n, long long int i) {
  long long int sum = 0;
  while (n > 0) {
    long long int r = n % 10;
    sum += r;
    n = n / 10;
  }
  return (sum == i) ? true : false;
}
vector<long long int> dp;
void dfs(long long int node, long long int parent) {
  if (visited[node] == 1) dp[node] = 1;
  for (auto it : graph[node]) {
    if (it == parent) continue;
    dfs(it, node);
    dp[node] += dp[it];
  }
}
const double PI = 3.14159265;
const double IS = 180.000;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int a, b, c;
  cin >> a >> b >> c;
  vector<long long> aa;
  for (long long int i = 1; i <= 81; i++) {
    long long x = b * (pow(i, a)) + c;
    if (x >= 1 && x < 1e9 && check(x, i)) {
      aa.push_back(x);
    }
  }
  cout << aa.size() << "\n";
  for (auto it : aa) cout << it << " ";
}
