#include <bits/stdc++.h>
int sum(int n) {
  int r, s;
  s = 0;
  while (n != 0) {
    r = n % 10;
    s = s + r;
    n = n / 10;
  }
  return s;
}
int power(int a, int b) {
  int s;
  s = 1;
  while (b--) {
    s *= a;
  }
  return s;
}
int main(void) {
  long long int a, b, c, s, j, cnt, i, x, flag;
  long long int xy[1000005];
  scanf("%I64d %I64d %I64d", &a, &b, &c);
  x = 0;
  flag = 0;
  j = 0;
  cnt = 0;
  for (i = 1; i <= 81; i++) {
    s = power(i, a);
    x = b * s + c;
    if (sum(x) == i && (x > 0 && x < 1000000000)) {
      xy[j++] = x;
      cnt++;
      flag = 1;
    }
  }
  if (flag == 1) {
    printf("%I64d\n", cnt);
    for (i = 0; i < cnt; i++) printf("%I64d ", xy[i]);
  } else
    printf("0\n");
  printf("\n");
  return 0;
}
