#include <bits/stdc++.h>
using namespace std;
long long po(int n, int m) {
  long long t = 1;
  for (int i = 0; i < m; i++) t *= n;
  return t;
}
int main() {
  long long a, b, c, d;
  cin >> a >> b >> c;
  vector<int> v;
  for (int i = 1; i <= 81; i++) {
    long long r = b * (po(i, a)) + c, x = 0;
    long long e = r;
    while (r) {
      x += r % 10;
      r /= 10;
    }
    if (x == i && e > 0 && e <= 1000000000) v.push_back(e);
  }
  cout << v.size() << endl;
  for (auto i : v) cout << i << " ";
  return 0;
}
