#include <bits/stdc++.h>
using namespace std;
long long ans, d[200100];
long long stepen(long long i, long long a1) {
  return (long long)pow((long double)a1, i);
}
long long sumcifr(long long a) {
  long long s = 0;
  while (a > 0) {
    s = s + a % 10;
    a /= 10;
  }
  return s;
}
int main() {
  long long i, a, b, c, k = 0;
  cin >> a >> b >> c;
  for (i = 0; i <= 81; i++) {
    ans = b * stepen(a, i) + c;
    if (ans > 0 && ans < 1000000000 && sumcifr(ans) == i) {
      k++;
      d[k] = ans;
    }
  }
  cout << k << endl;
  for (i = 1; i <= k; i++) cout << d[i] << " ";
  return 0;
}
