#include <bits/stdc++.h>
char s[100100];
int p[4];
int n, c0, c1, cx;
bool cond() {
  if (n % 2 == 0 && c1 * 2 <= n && c0 * 2 <= n) {
    return true;
  }
  if (n % 2 == 1 && c1 * 2 <= n + 1 && c0 * 2 <= n - 1) {
    return true;
  }
  return false;
}
int main() {
  int i;
  scanf("%s", s);
  n = strlen(s);
  c0 = c1 = cx = 0;
  for (i = 0; i < n; i++) {
    if (s[i] == '0') {
      c0++;
    } else if (s[i] == '1') {
      c1++;
    } else {
      cx++;
    }
  }
  p[0] = p[1] = p[2] = p[3] = 0;
  if (c0 + cx > c1) {
    printf("00\n");
  }
  if (cond()) {
    if (s[n - 1] == '1' || (s[n - 1] == '?' && cx + c0 != (n / 2))) {
      printf("01\n");
    }
    if (s[n - 1] == '0' || (s[n - 1] == '?' && cx + c1 != ((n + 1) / 2))) {
      printf("10\n");
    }
  }
  if (c1 + cx > c0 + (n % 2)) {
    printf("11\n");
  }
  scanf("%d", &n);
  return 0;
}
