#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9;
const double eps = 1e-9;
long long exp(long long b, long long e) {
  long long ans = b;
  while (--e) ans *= b;
  return ans;
}
int sum(int x) {
  if (!x) return 0;
  return x % 10 + sum(x / 10);
}
int main() {
  ios_base::sync_with_stdio(false);
  long long a, b, c;
  cin >> a >> b >> c;
  int maxn = 81;
  vector<int> vans;
  for (int i = 1; i <= maxn; ++i) {
    long long x = exp(i, a) * b + c;
    if (x < inf and sum(x) == i) {
      vans.push_back(x);
    }
  }
  sort(vans.begin(), vans.end());
  cout << vans.size() << endl;
  if (vans.size()) {
    for (int i = 0; i < int(vans.size()); ++i)
      cout << (i ? " " : "") << vans[i];
    cout << endl;
  }
}
