#include <bits/stdc++.h>
using namespace std;
int a, b, c;
vector<int> ans;
int sum(int curr) {
  int sum = 0;
  while (curr > 0) {
    sum += curr % 10;
    curr = curr / 10;
  }
  return sum;
}
long long go(long long x, int n) {
  long long ans = 1;
  for (int i = 0; i < n; i++) {
    ans = ans * x;
  }
  return ans;
}
int main() {
  scanf("%d %d %d", &a, &b, &c);
  for (int i = 0; i <= 81; i++) {
    long long curr = go(i, a) * b + c;
    if (curr > 1000000000LL || curr <= 0) continue;
    if (sum(curr) == i) ans.push_back(curr);
  }
  printf("%d\n", ans.size());
  for (int i = 0; i < ans.size(); i++) {
    printf("%d ", ans[i]);
  }
  return 0;
}
