#include <bits/stdc++.h>
int n, tmp[5], a;
using namespace std;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a;
    if (a == 0) {
      tmp[0] = 1;
      continue;
    }
    if (a == 100) {
      tmp[1] = 1;
      continue;
    }
    if (a % 10 == 0) {
      tmp[2] = a;
      continue;
    }
    if (a < 10) {
      tmp[3] = a;
      continue;
    }
    tmp[4] = a;
  }
  vector<int> ans;
  if (tmp[0]) ans.push_back(0);
  if (tmp[1]) ans.push_back(100);
  if (tmp[2]) ans.push_back(tmp[2]);
  if (tmp[3]) ans.push_back(tmp[3]);
  if (!tmp[2] && !tmp[3] && tmp[4]) ans.push_back(tmp[4]);
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) {
    if (i) printf(" ");
    cout << ans[i];
  }
  puts("");
}
