#include <bits/stdc++.h>
using namespace std;
int n, temp, a = -1, b = -1, c = -1, d = -1;
vector<int> ans, numbers;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> temp;
    numbers.push_back(temp);
    if (a == -1 && temp == 0) {
      a = 0;
      ans.push_back(temp);
      numbers.pop_back();
    } else if (b == -1 && temp / 10 == 0) {
      b = temp;
      ans.push_back(temp);
      numbers.pop_back();
    } else if (c == -1 && temp % 10 == 0 && temp / 100 == 0) {
      c = temp;
      ans.push_back(temp);
      numbers.pop_back();
    } else if (d == -1 && temp % 10 == 0 && temp % 100 == 0) {
      d = temp;
      ans.push_back(temp);
      numbers.pop_back();
    }
  }
  if (b == -1 && c == -1 && numbers.size() >= 1) {
    ans.push_back(numbers[0]);
    numbers.erase(numbers.begin());
  }
  if (ans.size() == 0)
    cout << 1 << endl << numbers[0];
  else {
    cout << ans.size() << endl;
    for (int i = 0; i < ans.size(); i++) {
      cout << ans[i] << " ";
    }
  }
  return 0;
}
