#include <bits/stdc++.h>
const int maxn = 101, L = 1e9;
long long a, b, c, x, ans[maxn];
int cnt;
long long f(long long e, long long f, long long g, long long sx) {
  long long t = 1;
  while (e--) {
    t = t * sx;
  }
  return t * f + g;
}
int main() {
  cnt = 0;
  scanf("%lld%lld%lld", &a, &b, &c);
  for (long long i = 1; i <= 81; i++) {
    x = f(a, b, c, i);
    if (x <= 0) continue;
    long long k = 0, tot = 0;
    long long t = x;
    while (t > 0) {
      tot += (t % 10);
      t /= 10;
    }
    if (tot == i && x > 0 && x < L) ans[cnt++] = x;
  }
  if (cnt == 0) {
    putchar('0');
    return 0;
  }
  printf("%d\n", cnt);
  for (int i = 0; i < cnt; i++) {
    printf("%lld", ans[i]);
    if (i < cnt - 1) putchar(' ');
  }
  return 0;
}
