#include <bits/stdc++.h>
using namespace std;
int stuff(int x) {
  int s = 0;
  while (x / 10 != 0) {
    int r = x % 10;
    x /= 10;
    s += r;
  }
  s += x;
  return s;
}
int main() {
  ios_base::sync_with_stdio(false);
  long long int i = 0;
  long long int p, f, a, b, c, s, spow = 1;
  long long int arr[1000];
  cin >> a >> b >> c;
  f = a;
  for (s = 1; s <= 81; s++) {
    f = a;
    spow = 1;
    while (f--) {
      spow *= s;
    }
    p = (b * spow) + c;
    if (stuff(p) == s && p < 1000000000) {
      arr[i] = p;
      i++;
    }
  }
  sort(arr, arr + i);
  cout << i << '\n';
  for (int j = 0; j < i; j++) {
    cout << arr[j] << ' ';
  }
}
