#include <bits/stdc++.h>
using namespace std;
int f[5];
int a[105];
int get(int x) {
  int type = 0;
  int cnt = 1;
  while (x) {
    if (x % 10) {
      type += cnt;
    }
    cnt <<= 1;
    x /= 10;
  }
  return type;
}
int main() {
  int n;
  scanf("%d", &n);
  int i;
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    f[get(a[i])] = 1;
  }
  if (f[1] + f[2] < f[3]) {
    cout << f[0] + f[3] + f[4] << endl;
    for (i = 0; i < n; i++) {
      int tmp = get(a[i]);
      if ((tmp == 3 && f[tmp] == 1) || (tmp == 0 && f[tmp] == 1) ||
          (tmp == 4 && f[tmp] == 1)) {
        cout << a[i] << " ";
        f[tmp] = 0;
      }
    }
  } else {
    cout << f[0] + f[1] + f[2] + f[4] << endl;
    for (i = 0; i < n; i++) {
      int tmp = get(a[i]);
      if (tmp != 3 && f[tmp] == 1) {
        cout << a[i] << " ";
        f[tmp] = 0;
      }
    }
  }
  cout << endl;
  return 0;
}
