#include <bits/stdc++.h>
using namespace std;
bool f(int x, int y) {
  if (x == 100 || y == 100 || x == 0 || y == 0) return 1;
  int xx = min(x, y);
  int yy = max(x, y);
  if (xx >= 1 && xx <= 9 && yy % 10 == 0) return 1;
  return 0;
}
int a[105];
set<int> res;
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  int is = 0;
  sort(a + 1, a + 1 + n);
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if (j == i) continue;
      if (f(a[i], a[j])) {
        res.insert(a[i]);
        res.insert(a[j]);
        is = 1;
        break;
      }
    }
    if (is) break;
  }
  for (int i = 1; i <= n; i++) {
    int t = a[i];
    bool ff = 1;
    for (auto it = res.begin(); it != res.end(); it++) {
      if (f(*it, t) == 0) {
        ff = 0;
        break;
      }
    }
    if (ff == 1) res.insert(t);
  }
  printf("%d\n", res.size());
  for (auto it = res.begin(); it != res.end(); it++) {
    printf("%d ", *it);
  }
  return 0;
}
