#include <bits/stdc++.h>
using namespace std;
long long modulo(long long a, long long b, long long c) {
  long long x = 1, y = a;
  while (b > 0) {
    if (b % 2 == 1) {
      x = (x * y) % c;
    }
    y = (y * y) % c;
    b /= 2;
  }
  return x % c;
}
vector<long long> ans;
int main() {
  long long a, b, c;
  cin >> a >> b >> c;
  long long x = 1;
  long long temp = 1;
  while (x <= 100) {
    temp = b * modulo(x, a, 1000000007) + c;
    if (temp >= 1000000000) break;
    long long temp2 = temp;
    long long sum = 0;
    while (temp2 > 0) {
      sum += temp2 % 10;
      temp2 = temp2 / 10;
    }
    if (sum == x) {
      ans.push_back(temp);
    }
    x++;
  }
  cout << ans.size() << "\n";
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i] << " ";
  }
}
