#include <bits/stdc++.h>
using namespace std;
long long int power(long long int x, long long int y, long long int p) {
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
int main() {
  long long a, b, c;
  cin >> a >> b >> c;
  map<long long, long long> S;
  for (long long i = 1; i <= 81; i++) {
    long long co = 1;
    for (long long j = 0; j < a; j++) {
      co = co * i;
    }
    S[i] = co * b + c;
  }
  set<long long> st;
  for (long long i = 1; i <= 81; i++) {
    long long dig = 0;
    long long temp = S[i];
    while (temp > 0) {
      dig += temp % 10;
      temp /= 10;
    }
    if (dig == i) {
      st.insert(S[i]);
    }
  }
  long long count = 0;
  for (auto d : st) {
    if (d > 0 && d < 1000000000) {
      count++;
    }
  }
  cout << count << endl;
  for (auto d : st) {
    if (d > 0 && d < 1000000000) {
      cout << d << " ";
    }
  }
  cout << endl;
  return 0;
}
