#include <bits/stdc++.h>
using namespace std;
const long long lim = 1e9;
long long a, b, c;
long long pw(long long a, int b) {
  long long r = 1;
  while (b--) r *= a;
  return r;
}
long long sd(long long x) {
  long long r = 0;
  while (x) {
    r += x % 10LL;
    x /= 10;
  }
  return r;
}
vector<long long> ans;
void find(long long s) {
  long long tmp = b * pw(s, a) + c;
  if (tmp > 0LL && tmp < lim && sd(tmp) == s) ans.push_back(tmp);
}
int main() {
  cin >> a >> b >> c;
  for (int i = 1; i <= 100; i++) find(i);
  sort(ans.begin(), ans.end());
  ans.erase(unique(ans.begin(), ans.end()), ans.end());
  cout << ans.size() << "\n";
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i];
    if (i < ans.size() - 1) cout << " ";
  }
  cout << "\n";
}
