#include <bits/stdc++.h>
using namespace std;
const int M = 1000000000;
long long temp;
int ans[100];
int a, b, c;
int s(long long x) {
  int t = 0;
  while (x > 0) {
    t += (x % 10);
    x /= 10;
  }
  return t;
}
int main() {
  scanf("%d%d%d", &a, &b, &c);
  for (int i = 1; i <= 81; i++) {
    temp = i;
    for (int j = 1; j < a; j++) temp *= i;
    temp *= b;
    temp += c;
    if (temp >= M) break;
    if (s(temp) == i) {
      ans[0]++;
      ans[ans[0]] = temp;
    }
  }
  printf("%d\n", ans[0]);
  for (int i = 1; i <= ans[0]; i++) {
    printf("%d ", ans[i]);
  }
}
