#include <bits/stdc++.h>
using namespace std;
int f(int x, int y);
int main() {
  int k;
  cin >> k;
  int d[k];
  for (int i = 0; i < k; i++) {
    cin >> d[i];
  }
  sort(d, d + k);
  vector<int> v;
  int c = 0;
  if (d[0] == 0)
    v.push_back(0);
  else {
    v.push_back(d[0]);
    while (d[0] / (f(10, c)) != 0) c += 1;
  }
  for (int i = 1; i < k; i++) {
    if (d[i] % (f(10, c)) == 0) {
      v.push_back(d[i]);
      c += 1;
    }
  }
  cout << v.size() << "\n";
  for (auto x : v) {
    cout << x << " ";
  }
}
int f(int x, int y) {
  if (y == 0) {
    return 1;
  } else
    return x * f(x, y - 1);
}
