#include <bits/stdc++.h>
using namespace std;
vector<int> v;
long long a, b, c;
long long POW(long long n, long long p) {
  long long s = n;
  for (long long i = 2; i <= p; i++) s *= n;
  return s;
}
long long sok(long long n) {
  long long sum = 0;
  while (n > 0) {
    sum += (n % 10);
    n /= 10;
  }
  return sum;
}
void f(long long n) {
  long long k;
  k = POW(n, a);
  k = (b * k) + c;
  long long p = sok(k);
  if (p == n && k < 1000000000) v.push_back(k);
}
int main() {
  long long n, i, j, k, l, m;
  while (cin >> a >> b >> c) {
    v.clear();
    for (i = 1; i <= 82; i++) f(i);
    l = v.size();
    cout << l << endl;
    sort(v.begin(), v.end());
    for (i = 0; i < l; i++) {
      cout << v[i];
      if (i == l - 1)
        cout << endl;
      else
        cout << " ";
    }
  }
  return 0;
}
