#include <bits/stdc++.h>
int main() {
  int i, j = 0, k, num, count = 0, hun = 0, nnt = 0, ind = 0;
  scanf("%d", &k);
  int arr1[k];
  int arr2[k];
  if (k == 1) {
    scanf("%d", &num);
    printf("1\n%d\n", num);
  } else {
    for (i = 0; i < k; i++) {
      scanf("%d", &arr1[i]);
      if (arr1[i] == 100) hun = 1;
      if (arr1[i] % 10 == 0 && arr1[i] != 100 && arr1[i] != 0) nnt++;
      if (arr1[i] % 10 == 0 && arr1[i] != 0) ind = 1;
    }
    if (hun == 1) {
      for (i = 0; i < k; i++) {
        if (arr1[i] == 100 || arr1[i] == 0) {
          count++;
          arr2[j] = arr1[i];
          j++;
        }
      }
      if (nnt > 0) {
        for (i = 0; i < k; i++) {
          if (arr1[i] % 10 == 0 && arr1[i] != 100 && arr1[i] != 0) {
            count++;
            arr2[j] = arr1[i];
            j++;
            break;
          }
        }
        for (i = 0; i < k; i++) {
          if (arr1[i] == 1 || arr1[i] == 2 || arr1[i] == 3 || arr1[i] == 4 ||
              arr1[i] == 5 || arr1[i] == 6 || arr1[i] == 7 || arr1[i] == 8 ||
              arr1[i] == 9) {
            count++;
            arr2[j] = arr1[i];
            j++;
            break;
          }
        }
      } else if (nnt == 0) {
        for (i = 0; i < k; i++) {
          if (arr1[i] % 10 != 0 && arr1[i] != 100 && arr1[i] != 0) {
            {
              count++;
              arr2[j] = arr1[i];
              j++;
              break;
            }
          }
        }
      }
    } else {
      if (ind == 0) {
        for (i = 0; i < k; i++) {
          if (arr1[i] != 0) {
            count++;
            arr2[j] = arr1[i];
            j++;
            break;
          }
        }
      }
      for (i = 0; i < k; i++) {
        if (arr1[i] == 0) {
          count++;
          arr2[j] = arr1[i];
          j++;
          break;
        }
      }
      if (nnt > 0) {
        for (i = 0; i < k; i++) {
          if (arr1[i] % 10 == 0 && arr1[i] != 0) {
            count++;
            arr2[j] = arr1[i];
            j++;
            break;
          }
        }
        for (i = 0; i < k; i++) {
          if (arr1[i] == 1 || arr1[i] == 2 || arr1[i] == 3 || arr1[i] == 4 ||
              arr1[i] == 5 || arr1[i] == 6 || arr1[i] == 7 || arr1[i] == 8 ||
              arr1[i] == 9) {
            count++;
            arr2[j] = arr1[i];
            j++;
            break;
          }
        }
      }
    }
    printf("%d\n", count);
    for (i = 0; i < count; i++) {
      printf("%d", arr2[i]);
      if (i < count - 1) printf(" ");
    }
    printf("\n");
  }
  return 0;
}
