#include <bits/stdc++.h>
using namespace std;
long long int power(long long int a, long long int b);
int main() {
  long long int a, b, c, i, j, x, k, sum, count;
  scanf("%lld", &a);
  scanf("%lld", &b);
  scanf("%lld", &c);
  long long int arr[81];
  count = 0;
  for (i = 1; i < 82; i++) {
    long long int t = power(i, a);
    k = ((b * t) + c);
    if (k <= 0 && k >= 1000000000) continue;
    x = k;
    sum = 0;
    while (x != 0) {
      j = x % 10;
      x = x / 10;
      sum = sum + j;
    }
    if (sum == i && k > 0 && k < 1000000000) {
      count++;
      arr[count - 1] = k;
    }
  }
  cout << count;
  if (count) {
    cout << endl;
    for (i = 0; i < count; i++) {
      cout << arr[i] << " ";
    }
  }
  return 0;
}
long long int power(long long int a, long long int b) {
  long long int tpower = 1;
  for (int i = 0; i < b; i++) {
    tpower = tpower * a;
  }
  return tpower;
}
