#include <bits/stdc++.h>
using namespace std;
long long Modpower(long long x, long long y) {
  long long res = 1;
  x = x % 1000000007;
  while (y > 0) {
    if (y & 1) res = (res * x) % 1000000007;
    y = y >> 1;
    x = (x * x) % 1000000007;
  }
  return res;
}
long long power(long long x, long long y) {
  long long res = 1;
  ;
  while (y > 0) {
    if (y & 1) res = (res * x);
    y = y >> 1;
    x = (x * x);
  }
  return res;
}
long long BINARY_SEARCH(long long dp[], long long n, long long key) {
  long long s = 1;
  long long e = n;
  while (s <= e) {
    long long mid = (s + e) / 2;
    if (dp[mid] == key)
      return mid;
    else if (dp[mid] > key)
      e = mid - 1;
    else
      s = mid + 1;
  }
  return -1;
}
string CONVERT_TO_BINARY(long long s) {
  string res = "";
  while (s != 0) {
    res += (char)('0' + s % 2);
    s /= 2;
  }
  reverse(res.begin(), res.end());
  return res;
}
bool PALIN(string s) {
  long long i = 0;
  long long j = s.length() - 1;
  while (i <= j) {
    if (s[i] != s[j]) return false;
    j--, i++;
  }
  return true;
}
long long STOI(string s) {
  long long num = 0;
  long long po = 1;
  for (long long i = s.length() - 1; i >= 0; i--) {
    num += po * (s[i] - '0');
    po *= 10;
  }
  return num;
}
long long modInverse(long long a, long long m) { return power(a, m - 2); }
int makeSieve(int n) {
  bool isPrime[n + 1];
  for (int i = 0; i <= n; i++) {
    isPrime[i] = true;
  }
  isPrime[0] = false;
  isPrime[1] = false;
  for (int i = 2; i * i <= n; i++) {
    if (isPrime[i] == true) {
      for (int j = i * i; j <= n; j += i) {
        isPrime[j] = false;
      }
    }
  }
  int count = 0;
  for (int i = 0; i <= n; i++) {
    if (isPrime[i] == true) {
      count++;
    }
  }
  return count;
}
long long S(long long x) {
  if (x < 0) return -1;
  long long s = 0;
  while (x) {
    s += x % 10;
    x /= 10;
  }
  return s;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long a, b, c;
  cin >> a >> b >> c;
  vector<long long> vect;
  for (long long i = 1; i <= 81; i++) {
    long long ans = power(i, a) * b + c;
    if (S(ans) == i && ans > 0 && ans < 1000000007 - 7) {
      vect.push_back(ans);
    }
  }
  sort(vect.begin(), vect.end());
  cout << vect.size() << endl;
  if (vect.size() == 0) {
    return 0;
  }
  for (long long i = 0; i <= vect.size() - 1; i++) {
    cout << vect[i] << " ";
  }
}
