#include <bits/stdc++.h>
using namespace std;
long long ma = 1e9;
long long sum(long long x) {
  long long s = 0;
  while (x) {
    s += (x % 10);
    x /= 10;
  }
  return s;
}
long long p(long long a, long long b) {
  long long f = 1;
  while (b--) f *= a;
  return f;
}
long long ex(long long a, long long b, long long c, long long i) {
  return b * p(i, a) + c;
}
int main() {
  int a, b, c;
  cin >> a >> b >> c;
  vector<long long> v;
  for (int i = 1; i <= 81; i++) {
    long long k = ex(a, b, c, i);
    if (sum(k) == i and k <= ma) v.push_back(k);
  }
  cout << v.size() << endl;
  for (int i = 0; i < v.size(); i++) cout << v[i] << " ";
}
