#include <bits/stdc++.h>
using namespace std;
void putout(int n) {
  for (int i = 1; i <= n; i++) cout << 0 << " ";
}
int main() {
  int n, i, num = 0, a, b[5] = {1, 0, 0, 0, 0}, ok = 0;
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> a;
    if (a == 0) {
      if (ok == 0) num++;
      b[0] = 0;
      ok++;
    } else if (a > 0 && a < 10 && b[1] == 0) {
      num++;
      b[1] = a;
    } else if (a >= 10 && a < 100 && a % 10 == 0 && b[2] == 0) {
      num++;
      b[2] = a;
    } else if (a >= 10 && a < 100 && a % 10 != 0 && b[4] == 0) {
      b[4] = a;
    } else if (a == 100 && b[3] == 0) {
      num++;
      b[3] = 100;
    }
  }
  if (num == 1 && (b[0] == 0 || b[3] == 100)) {
    if (b[0] == 0 && b[4] != 0) {
      cout << ok + 1 << endl;
      putout(ok);
      cout << b[4] << endl;
    } else if (b[0] == 0 && b[4] == 0) {
      cout << ok << endl;
      putout(ok);
    } else if (b[3] == 100 && b[4] != 0)
      cout << 2 << endl << b[4] << " " << 100 << endl;
    else if (b[3] == 100 && b[4] == 0)
      cout << 1 << endl << 100 << endl;
    else if (b[2] != 0)
      cout << 1 << endl << b[2] << endl;
    else if (b[1] != 0)
      cout << 1 << endl << b[1] << endl;
  } else if (num == 2 && b[0] == 0 && b[3] == 100 && b[4] != 0) {
    cout << ok + 2 << endl;
    putout(ok);
    cout << b[4] << " " << 100 << endl;
  } else if (num == 0 && b[4] != 0)
    cout << 1 << endl << b[4] << endl;
  else {
    if (ok == 0)
      cout << num << endl;
    else
      cout << ok - 1 + num << endl;
    if (b[0] == 0) putout(ok);
    if (b[1] != 0) cout << b[1] << " ";
    if (b[2] != 0) cout << b[2] << " ";
    if (b[3] != 0) cout << b[3] << " ";
  }
  return 0;
}
