#include <bits/stdc++.h>
using namespace std;
long long a, b, c;
set<long long> sol;
long long bigPow(long long x, long long y) {
  if (!y) return 1;
  long long ret = bigPow(x, y / 2);
  ret *= ret;
  if (y % 2) ret *= x;
  return ret;
}
long long getSum(int num) {
  long long ret = 0;
  while (num) {
    ret += num % 10;
    num /= 10;
  }
  return ret;
}
int main() {
  long long num;
  while (cin >> a >> b >> c) {
    sol.clear();
    for (int i = 1; i <= 81; ++i) {
      if (getSum(b * bigPow(i, a) + c) == i && b * bigPow(i, a) + c > 0 &&
          b * bigPow(i, a) + c < 999999999)
        sol.insert(b * bigPow(i, a) + c);
      if (b * bigPow(i, a) + c > 999999999) break;
    }
    cout << sol.size() << '\n';
    set<long long>::iterator it;
    for (it = sol.begin(); it != sol.end(); it++) {
      cout << (*it) << " ";
    }
    if (sol.size()) cout << '\n';
  }
  return 0;
}
