#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:256000000")
template <class T>
T sqr(T a) {
  return a * a;
}
bool ok(vector<int> &a) {
  int n = (int)(a).size();
  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j < n; ++j) {
      int k1 = a[i], k2 = a[j];
      while (k1 || k2) {
        int t1 = k1 % 10;
        int t2 = k2 % 10;
        if (t1 * t2) return 0;
        k1 /= 10;
        k2 /= 10;
      }
    }
  }
  return 1;
}
int main() {
  int n;
  cin >> n;
  int a[100];
  vector<int> res;
  bool was[100] = {0};
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    if (!a[i]) {
      res.push_back(a[i]);
      was[i] = 1;
    }
    if (a[i] == 100) {
      res.push_back(a[i]);
      was[i] = 1;
    }
  }
  for (int i = 0; i < n; ++i) {
    if (a[i] % 10 && a[i] < 10 && !was[i]) {
      res.push_back(a[i]);
      was[i] = 1;
      break;
    }
  }
  for (int i = 0; i < n; ++i) {
    if (a[i] && !(a[i] % 10) && a[i] != 100 && !was[i]) {
      res.push_back(a[i]);
      was[i] = 1;
      break;
    }
  }
  for (int i = 0; i < n; ++i) {
    if (was[i]) continue;
    res.push_back(a[i]);
    if (!ok(res)) res.pop_back();
  }
  cout << (int)(res).size() << endl;
  for (int i = 0; i < (int)(res).size(); ++i) cout << res[i] << " ";
  cout << endl;
  return 0;
}
