#include <bits/stdc++.h>
using namespace std;
long long sum[85];
long long sumdigits(long long n) {
  long long ans = 0;
  while (n > 0) {
    ans += (n % 10);
    n /= 10;
  }
  return ans;
}
signed main() {
  long long a, b, c;
  cin >> a >> b >> c;
  for (long long i = 1; i <= 81; i++) {
    sum[i] = (b * (pow(i, a))) + c;
  }
  vector<long long> v;
  for (long long i = 1; i <= 81; i++) {
    if (sumdigits(sum[i]) == i && sum[i] > 0 && sum[i] < 1e9) {
      v.push_back(sum[i]);
    }
  }
  cout << (long long)v.size() << '\n';
  for (auto i : v) {
    cout << i << ' ';
  }
}
