#include <bits/stdc++.h>
using namespace std;
vector<int> vec;
int cal(long long x) {
  int sum = 0;
  while (x > 0) {
    sum += x % 10;
    x = x / 10;
  }
  return sum;
}
int main() {
  int a, b, c;
  while (cin >> a >> b >> c) {
    for (int i = 1; i <= 81; i++) {
      long long ti = i;
      for (int j = 1; j < a; j++) ti = ti * i;
      ti = ti * b + c;
      if (ti <= 1000000000 && ti >= 0 && cal(ti) == i) vec.push_back(ti);
    }
    cout << vec.size() << endl;
    sort(vec.begin(), vec.end());
    for (int i = 0; i < vec.size(); i++) cout << vec[i] << " ";
    cout << endl;
    vec.clear();
  }
  return 0;
}
