#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1e5 + 1;
const int MOD = 998244353;
const int INF = 1e9;
const long long LINF = 1e18;
long long value(long long b, long long sx, long long a, long long c) {
  long long ret = c;
  long long mult = 1;
  while (a--) {
    if (mult > 1e10 / sx) return 0;
    mult *= sx;
  }
  if (mult > 1e10 / b) return 0;
  mult *= b;
  ret += mult;
  return ret;
}
long long sod(long long x) {
  int ret = 0;
  while (x != 0) {
    ret += x % 10;
    x /= 10;
  }
  return ret;
}
void solve() {
  int a, b, c;
  cin >> a >> b >> c;
  vector<int> ans;
  for (int sx = 1; sx <= 81; sx++) {
    long long val = value(b, sx, a, c);
    if (sx == sod(val)) {
      if (val < 1e9 && val > 0) ans.push_back(val);
    }
  }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); ++i) cout << ans[i] << " ";
  cout << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    solve();
  }
}
