#include <bits/stdc++.h>
using namespace std;
long long sumd(long long x) {
  long long sum = 0;
  while (x) {
    sum += x % 10;
    x /= 10;
  }
  return sum;
}
long long poww(long long x, long long k) {
  long long res = 1;
  while (k--) {
    res *= x;
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long a, b, c;
  cin >> a >> b >> c;
  vector<long long> ans;
  for (int i = 1; i <= 81; i++) {
    long long x = b * (poww(i, a)) + c;
    if (sumd(x) == i && x < 1000000000) ans.push_back(x);
  }
  cout << ans.size() << endl;
  for (auto &i : ans) cout << i << " ";
  return 0;
}
