#include <bits/stdc++.h>
using namespace std;
vector<long long> ans;
int main() {
  long long a, b, c;
  cin >> a >> b >> c;
  for (long long i = 0; i <= 100; i++) {
    long long v = b * (long long)pow(i, a) + c, num = 0, t = v;
    while (v) {
      num += v % 10;
      v /= 10;
    }
    if (num == i && t > 0 && t < 1e9) ans.push_back(t);
  }
  cout << ans.size() << endl;
  for (auto i : ans) {
    cout << i << " ";
  }
  cout << endl;
}
