#include <bits/stdc++.h>
using namespace std;
const int MAXN = 128;
int n;
int a[MAXN];
vector<int> v, tmp;
void read() {
  int i;
  scanf("%d", &n);
  for (i = 0; i < n; ++i) {
    scanf("%d", &a[i]);
  }
}
bool check(int num) {
  int i;
  for (i = 0; i < tmp.size(); ++i) {
    int f = num, l = tmp[i];
    while (f && l) {
      if (f % 10 != 0 && l % 10 != 0) return 0;
      f /= 10;
      l /= 10;
    }
  }
  return 1;
}
void solve() {
  int i, j, size = 0;
  for (j = 0; j < n; ++j) {
    tmp.clear();
    tmp.push_back(a[j]);
    for (i = 0; i < n; ++i) {
      if (i == j) continue;
      if (a[i] == 0)
        tmp.push_back(a[i]);
      else if (check(a[i]))
        tmp.push_back(a[i]);
    }
    if (tmp.size() > size) {
      size = tmp.size();
      v = tmp;
    }
  }
  printf("%d\n", v.size());
  for (i = 0; i < v.size(); ++i) {
    printf("%d ", v[i]);
  }
  printf("\n");
}
int main() {
  read();
  solve();
  return 0;
}
