#include <bits/stdc++.h>
using namespace std;
class s1 {
 public:
  s1() {
    int n, m;
    int d;
    int dc;
    scanf("%d %d", &n, &m);
    d = 0;
    dc = 0;
    while (n) {
      n--;
      d++;
      dc++;
      if (dc == m) {
        dc = 0;
        n++;
      }
    }
    printf("%d\n", d);
  }
};
class s2 {
 public:
  s2() {
    int a, b, c;
    vector<int> v;
    scanf("%d %d %d", &a, &b, &c);
    for (int i = 0; i <= 81; i++) {
      long int t = c + ((long int)b * pow(i, a));
      int s = getsum(t);
      if (s == i && t > 0 && t < 1e9) {
        v.push_back(t);
      }
      if (t >= 1e9) {
        break;
      }
    }
    sort(v.begin(), v.end());
    a = v.size();
    printf("%d\n", a);
    for (int i = 0; i < a; i++) printf("%d ", v[i]);
    printf("\n");
  }
  int getsum(long int i) {
    int ret = 0;
    while (i >= 10) {
      ret += i % 10;
      i /= 10;
    }
    return ret + i;
  }
  long int pow(int v, int n) {
    long int s = 1;
    for (int i = 0; i < n; i++) s *= v;
    return s;
  }
};
int main() {
  s2* cS2 = new s2();
  return 0;
}
