#include <bits/stdc++.h>
using namespace std;
int s(int x) {
  int sum = 0;
  while (x > 0) {
    sum += x % 10;
    x /= 10;
  }
  return sum;
}
int main() {
  long long a, b, c;
  cin >> a >> b >> c;
  vector<int> ans;
  long long x;
  for (int i = 1; i <= 80; i++) {
    x = b * (long long)ceil(pow(i, a)) + c;
    if (s(x) == i && x < 1e9) {
      ans.push_back(x);
    }
  }
  cout << ans.size() << endl;
  sort(ans.begin(), ans.end());
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i] << " ";
  }
  return 0;
}
