#include <bits/stdc++.h>
using namespace std;
const double PI = 2.0 * acos(0.0);
const double EPS = 1e-6;
int main() {
  int n;
  scanf("%d", &n);
  vector<int> V;
  int arr[105];
  for (int i = 0; i < n; i++) scanf("%d", &arr[i]);
  bool found = false;
  for (int i = 0; i < n; i++)
    if (arr[i] == 0 || arr[i] == 100) V.push_back(arr[i]);
  for (int i = 0; i < n; i++)
    if (arr[i] % 10 == 0 && arr[i] != 0 && arr[i] != 100) {
      V.push_back(arr[i]);
      found = true;
      break;
    }
  for (int i = 0; i < n; i++)
    if (arr[i] > 0 && arr[i] < 10) {
      V.push_back(arr[i]);
      found = true;
      break;
    }
  if (!found) {
    for (int i = 0; i < n; i++)
      if (arr[i] > 10 && arr[i] % 10 != 0) {
        V.push_back(arr[i]);
        break;
      }
  }
  printf("%d\n", ((int)(V).size()));
  if (((int)(V).size()) > 0) {
    printf("%d", V[0]);
    for (int i = 1; i < ((int)(V).size()); i++) printf(" %d", V[i]);
    puts("");
  }
  return 0;
}
