#include <bits/stdc++.h>
using namespace std;
vector<int> v;
bool freq[105];
int main() {
  int n;
  cin >> n;
  bool f = 0;
  bool f1 = 0;
  for (int i = 0; i < n; i++) {
    int s;
    cin >> s;
    freq[s] = 1;
    if (s == 0 || s == 100) {
      v.push_back(s);
      freq[s] = 1;
    } else if (s > 0 && s < 10 && f1 == 0) {
      v.push_back(s);
      freq[s] = 1;
      f1 = 1;
    } else if (s % 10 == 0 && f == 0) {
      v.push_back(s);
      freq[s] = 1;
      f = 1;
    }
  }
  if (f == 0 && f1 == 0 || v.size() == 0) {
    for (int i = 0; i < 105; i++) {
      if (i > 10 && i < 100 && i % 10 != 0 && freq[i] == 1) {
        v.push_back(i);
        break;
      }
    }
  }
  cout << v.size() << endl;
  for (int i = 0; i < v.size(); i++) {
    cout << v[i] << " ";
  }
  cout << endl;
  return 0;
}
