#include <bits/stdc++.h>
using namespace std;
long long a, b, c;
long long tmp[100];
long long ans[123];
bool check(long long u, long long t) {
  long long ans = 0, tmp = u;
  while (u) {
    ans += u % 10ll;
    u /= 10ll;
  }
  return ans == t && tmp < 1000000000;
}
int main() {
  while (cin >> a >> b >> c) {
    for (long long i = 1; i <= 81; i++) {
      long long cut = i;
      for (int j = 0; j < a - 1; j++) cut *= i;
      tmp[i] = b * cut + c;
    }
    int l = 0;
    for (long long i = 1; i < 82; i++) {
      if (check(tmp[i], i)) {
        ans[l++] = tmp[i];
      }
    }
    cout << l << endl;
    for (int i = 0; i < l; i++) {
      printf("%I64d ", ans[i]);
    }
    cout << endl;
  }
  return 0;
}
