#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c, dem, gg, gg1;
  long long kq[10000];
  int sum;
  cin >> a >> b >> c;
  dem = 0;
  for (int i = 1; i <= 81; i++) {
    gg = 1;
    for (int j = 1; j <= a; j++) {
      gg *= i;
    }
    gg = gg * b + c;
    if (gg <= 1000000000 && gg >= 1) {
      sum = 0;
      gg1 = gg;
      while (gg > 0) {
        sum = sum + (gg % 10);
        gg = gg / 10;
      }
      if (sum == i) {
        kq[++dem] = gg1;
      }
    }
  }
  cout << dem << "\n";
  for (int i = 1; i <= dem; i++) {
    cout << kq[i] << " ";
  }
}
