#include <bits/stdc++.h>
using namespace std;
long long int a, b, c;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> a >> b >> c;
  vector<long long int> v;
  for (long long int sum = 1; sum <= 81; sum++) {
    long long int s = sum;
    for (long long int i = 1; i < a; i++) s = sum * s;
    long long int x = (b * s) + c;
    if (x < 1e9 && x > 0) {
      long long int y = x, sum1 = 0;
      while (y) {
        long long int dig = y % 10;
        sum1 = sum1 + dig;
        y = y / 10;
      }
      if (sum1 == sum) v.push_back(x);
    }
  }
  cout << v.size() << endl;
  for (auto g : v) cout << g << " ";
  return 0;
}
