#include <bits/stdc++.h>
using namespace std;
long long countdigit(long long x) {
  long long c = 0;
  while (x > 0) {
    c += x % 10;
    x /= 10;
  }
  return c;
}
int main() {
  long long a, b, c;
  cin >> a >> b >> c;
  vector<long long> vec;
  long long kmax = (1000000000 - c) / b;
  long long kmin = (0 - c) / b;
  for (long long i = 1; i <= 81; i++) {
    long long x = b * pow(i, a) + c;
    if (x > 0 && x < 1000000000 && i == countdigit(x)) {
      vec.push_back(x);
    }
  }
  long long nos = vec.size();
  cout << nos << endl;
  for (long long i = 0; i < nos; i++) cout << vec.at(i) << " ";
  return 0;
}
