#include <bits/stdc++.h>
using namespace std;
int main() {
  int k;
  cin >> k;
  cin.get();
  int nmax = 0;
  int kmax = -1;
  vector<int> num(k);
  bool zeros[100][3];
  for (int i = 0; i < k; ++i) {
    cin >> num[i];
    if (num[i] == 100)
      zeros[i][0] = false;
    else
      zeros[i][0] = true;
    if ((num[i] % 100) / 10 == 0)
      zeros[i][1] = true;
    else
      zeros[i][1] = false;
    if (num[i] % 10 == 0)
      zeros[i][2] = true;
    else
      zeros[i][2] = false;
  }
  for (int i = 0; i < k; ++i) {
    int can = 1;
    vector<int> cansum;
    cansum.push_back(i);
    for (int j = 0; j < k; ++j) {
      if (j != i) {
        bool flag = true;
        for (int z = 0; z < cansum.size(); ++z) {
          for (int m = 0; m < 3; ++m) {
            if (zeros[cansum[z]][m] == 0 && zeros[j][m] == 0) flag = false;
          }
          if (!flag) break;
        }
        if (flag) {
          ++can;
          cansum.push_back(j);
        }
      }
    }
    if (cansum.size() > nmax) {
      nmax = cansum.size();
      kmax = i;
    }
  }
  cout << nmax << endl;
  cout << num[kmax];
  int i = kmax;
  vector<int> cansum;
  cansum.push_back(i);
  for (int j = 0; j < k; ++j) {
    if (j != i) {
      bool flag = true;
      for (int z = 0; z < cansum.size(); ++z) {
        for (int m = 0; m < 3; ++m) {
          if (zeros[cansum[z]][m] == 0 && zeros[j][m] == 0) flag = false;
        }
        if (!flag) break;
      }
      if (flag) {
        cout << " " << num[j];
        cansum.push_back(j);
      }
    }
  }
  cout << endl;
  return 0;
}
