#include <bits/stdc++.h>
using namespace std;
long long int exp(long long int n, long long int p) {
  long long int temp;
  if (p == 1)
    return n;
  else if (p == 0)
    return 1;
  if (n == 0) return 0;
  if (p % 2 == 0) {
    temp = (exp(n, p / 2));
    return temp * temp;
  } else if (p % 2 != 0) {
    temp = exp(n, p / 2);
    return temp * temp * n;
  }
}
int sum(long long int x, long long int i) {
  long long int temp = 0, man = x;
  while (man > 0) {
    temp = temp + man % 10;
    man /= 10;
  }
  if (temp != i) return 0;
  return 1;
}
int arr[100005];
int main() {
  long long int a, b, c, i, x = 0;
  cin >> a >> b >> c;
  int index = 0;
  for (i = 0; i < 82; i++) {
    x = 1LL * b * exp(i, a) + c;
    if (sum(x, i) && x > 0 && x < 1000000000) {
      arr[index] = x;
      index++;
    }
  }
  cout << index << "\n";
  for (i = 0; i < index; i++) cout << arr[i] << " ";
  return 0;
}
