#include <bits/stdc++.h>
using namespace std;
int sum(long long int x) {
  int res = 0;
  while (x != 0) {
    res += x % 10;
    x = x / 10;
  }
  return res;
}
long long int f(int a, int b, int c, int x) {
  long long int u = 1;
  for (int i = (0); i < (a); ++i) u *= x * 1LL;
  u *= b * 1LL;
  u += c * 1LL;
  return u;
}
int main() {
  ios_base::sync_with_stdio(0);
  int a, b, c;
  cin >> a >> b >> c;
  ;
  vector<int> res;
  for (int i = (1); i < (82); ++i) {
    long long int u = f(a, b, c, i);
    if (u > 0 && u < 1e9) {
      if (sum(u) == i) res.push_back(u);
    }
  }
  cout << res.size() << endl;
  for (int i = (0); i < (res.size()); ++i) cout << res[i] << " ";
  cout << endl;
  return 0;
}
