#include <bits/stdc++.h>
using namespace std;
long long pw(long long num, long long l) {
  long long ret = 1;
  for (long long i = 1; i <= l; i++) {
    ret *= num;
  }
  return ret;
}
int dgtsm(long long nm) {
  int sm = 0;
  while (nm) {
    sm += nm % 10;
    nm /= 10;
  }
  return sm;
}
int main() {
  vector<long long> v;
  long long a, b, c, x;
  cin >> a >> b >> c;
  for (long long i = 1; i <= 81; i++) {
    x = b * pw(i, a) + c;
    if (x > 0 && x < 1000000000 && dgtsm(x) == i) {
      v.push_back(x);
    }
  }
  long long nm = v.size();
  cout << nm;
  puts("");
  for (long long i = 0; i < nm; i++) {
    cout << v[i] << " ";
  }
}
