#include <bits/stdc++.h>
using namespace std;
void ipgraph(long long n, long long m);
vector<vector<long long>> v;
vector<bool> vis;
long long p = pow(10, 9) + 7;
long long power(long long a, long long b, long long p) {
  if (b == 0) return 1;
  long long c = power(a, b / 2, p);
  if (b % 2 == 0)
    return ((c * c) % p);
  else
    return ((((c * c) % p) * a) % p);
}
long long sumod(long long n) {
  long long ans = 0;
  while (n) {
    ans += n % 10;
    n /= 10;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t, i, j, n, m, k, l;
  t = 1;
  while (t--) {
    long long a, b, c;
    cin >> a >> b >> c;
    vector<long long> v;
    for (long long i = 1; i < 82; i++) {
      if (b * power(i, a, p) + c < pow(10, 9) && b * power(i, a, p) + c > 0 &&
          sumod(b * power(i, a, p) + c) == i)
        v.push_back(b * power(i, a, p) + c);
    }
    cout << v.size() << '\n';
    for (auto x : v) {
      cout << x << " ";
    }
    cout << '\n';
    ;
  }
  cerr << endl
       << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC
       << "ms\n";
  return 0;
}
void ipgraph(long long n, long long m) {
  v.assign(n, {});
  vis.assign(n, 0);
  long long x, y;
  for (long long i = 0; i < m; i++) {
    cin >> x >> y;
    x--, y--;
    v[x].push_back(y);
    v[y].push_back(x);
  }
}
