#include <bits/stdc++.h>
using namespace std;
int a[101], ans[10], ansIn;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  int i = 0;
  if (a[0] == 0) {
    i++;
    ans[ansIn++] = 0;
  }
  if (a[n - 1] == 100) {
    n--;
    ans[ansIn++] = 100;
  }
  int t, t2;
  bool f1 = false, f2 = false, f3 = false;
  for (; i < n; i++)
    if (a[i] < 10) {
      t = i;
      f1 = true;
    } else {
      if (a[i] % 10 != 0) {
        t2 = i;
        f2 = true;
      } else {
        if (!f3) ans[ansIn++] = a[i];
        f3 = true;
      }
    }
  if (f3 && f1)
    ans[ansIn++] = a[t];
  else if (!f3) {
    if (f1)
      ans[ansIn++] = a[t];
    else if (f2)
      ans[ansIn++] = a[t2];
  }
  cout << ansIn << endl;
  for (int i = 0; i < ansIn; i++) cout << ans[i] << " ";
  cout << endl;
  return 0;
}
