#include <bits/stdc++.h>
using namespace std;
template <typename F, typename S>
ostream &operator<<(ostream &os, const pair<F, S> &p) {
  return os << "(" << p.first << ", " << p.second << ")";
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  os << "{";
  typename vector<T>::const_iterator it;
  for (it = v.begin(); it != v.end(); it++) {
    if (it != v.begin()) os << ", ";
    os << *it;
  }
  return os << "}";
}
template <typename T>
ostream &operator<<(ostream &os, const set<T> &v) {
  os << "[";
  typename set<T>::const_iterator it;
  for (it = v.begin(); it != v.end(); it++) {
    if (it != v.begin()) os << ", ";
    os << *it;
  }
  return os << "]";
}
template <typename F, typename S>
ostream &operator<<(ostream &os, const map<F, S> &v) {
  os << "[";
  typename map<F, S>::const_iterator it;
  for (it = v.begin(); it != v.end(); it++) {
    if (it != v.begin()) os << ", ";
    os << it->first << " = " << it->second;
  }
  return os << "]";
}
long long dx[4] = {1, -1, 0, 0};
long long dy[4] = {0, 0, 1, -1};
const long long N = 1e5 + 5, M = 30000 + 5, mod = 1e9 + 7, MOD = 1000000000 + 7,
                inf = 5e12, MAX = 1e6 + 5;
string alphabet = "abcdefghijklmnopqrstuvwxyz",
       capital = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
long long sod(long long x) {
  x = abs(x);
  long long res = 0;
  while (x) {
    res += (x % 10);
    x /= 10;
  }
  return res;
}
void solve(long long tt) {
  long long n, m, i, j, k, a, b, c;
  string s;
  cin >> a >> b >> c;
  vector<long long> res;
  for (long long i = 1; i <= 81; i++) {
    long long px = i;
    for (j = 1; j < a; j++) px *= i;
    long long x = b * px + c;
    if (sod(x) == i && x > 0 && x <= 999999999) res.push_back(x);
  }
  cout << res.size() << "\n";
  for (auto z : res) cout << z << " ";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long i;
  long long T = 1;
  for (auto blockTime = make_pair(chrono::high_resolution_clock::now(), true);
       blockTime.second;
       fprintf(stderr, "%s: %d ms\n", "Exec Time : ",
               (long long)chrono::duration_cast<chrono::milliseconds>(
                   chrono::high_resolution_clock::now() - blockTime.first)
                   .count()),
            fflush(stderr), blockTime.second = false) {
    long long x = 1;
    while (x <= T) {
      solve(x);
      x++;
    }
  }
  return 0;
}
