#include <bits/stdc++.h>
using namespace std;
unsigned long long int power(long long int a, int b) {
  unsigned long long int c = 1;
  for (int i = 0; i < b; i++) {
    c *= a;
  }
  if (b == 0)
    return 1;
  else
    return c;
}
int sum(long long int a) {
  int s = 0;
  while (a != 0) {
    s += a % 10;
    a = a / 10;
  }
  return s;
}
int main() {
  long long int a, b, c, d, i, j, k, l, a1[10000], x = 0;
  cin >> a >> b >> c;
  for (i = 1; i <= 81; i++) {
    k = b * power(i, a) + c;
    if (k < 1000000001) {
      if (sum(k) == i) {
        a1[x] = k;
        x++;
      }
    }
  }
  cout << x << endl;
  for (i = 0; i < x; i++) cout << a1[i] << " ";
}
