#include <bits/stdc++.h>
using namespace std;
long long int pow(long long int a, long long int b) {
  if (b == 1) {
    return a;
  } else {
    return a * pow(a, b - 1);
  }
}
int main() {
  vector<int> v;
  long long int a, b, c, sum, num;
  cin >> a >> b >> c;
  for (sum = 1; sum <= 81; sum++) {
    num = (b * (pow(sum, a))) + c;
    if (num >= 1000000000) break;
    int n = num, s_d = 0;
    while (n) {
      s_d += n % 10;
      n /= 10;
    }
    if (s_d == sum) {
      v.push_back(num);
    }
  }
  cout << v.size() << '\n';
  for (int i = 0; i < v.size(); i++) {
    cout << v[i] << " ";
  }
  return 0;
}
