#include <bits/stdc++.h>
using namespace std;
int a, b, c;
long long d, sum;
set<long long> s;
int sum_of_digits(long long x) {
  int sum = 0;
  while (x) {
    sum += (x % 10);
    x /= 10;
  }
  return sum;
}
long long pwr(int i, int a) {
  if (a == 0) return 1;
  long long d = pwr(i, a / 2);
  if (a % 2 == 0) return d * d;
  return i * d * d;
}
int main() {
  scanf("%d%d%d", &a, &b, &c);
  for (int i = 1; i <= 81; i++) {
    sum = pwr(i, a);
    d = b * sum + c;
    if (i == sum_of_digits(d) && d < 1000000000) s.insert(d);
  }
  cout << s.size() << endl;
  for (auto i : s) {
    cout << i << " ";
  }
}
