#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  while (scanf("%d %d %d", &a, &b, &c) != EOF) {
    vector<int> ve;
    int i;
    int j;
    for (i = 1; i <= 81; i++) {
      long long sum = 1;
      for (j = 1; j <= a; j++) {
        sum *= i;
      }
      if (b * sum + c > 0 && b * sum + c < 1000000000) {
        int s = b * sum + c;
        int ss = 0;
        while (s) {
          ss += s % 10;
          s /= 10;
        }
        if (ss == i) ve.push_back(b * sum + c);
      }
    }
    printf("%d\n", ve.size());
    for (i = 0; i < ve.size(); i++) {
      printf("%d ", ve[i]);
    }
    printf("\n");
  }
  return 0;
}
