#include <bits/stdc++.h>
using namespace std;
int MATCH2(int x, int y) {
  int a = max(x, y);
  int b = min(x, y);
  int sum = 0, e = 0, D, d1, d2;
  while (a > 0) {
    d1 = a % 10;
    d2 = b % 10;
    if (d1 == 0 || d2 == 0) sum += (d1 + d2) * pow(10, e);
    a /= 10;
    b /= 10;
    e++;
  }
  if (sum == (x + y))
    return sum;
  else
    return -1;
}
int main() {
  int n;
  cin >> n;
  vector<int> V(n);
  for (int i = 0; i < n; ++i) {
    cin >> V[i];
  }
  sort(V.begin(), V.end());
  int prev = 0, m;
  vector<int> ans;
  for (int i = 0; i < n; ++i) {
    m = MATCH2(prev, V[i]);
    if (m != -1) {
      prev = m;
      ans.push_back(V[i]);
    }
  }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); ++i) {
    cout << ans[i] << " ";
  }
  return 0;
}
