#include <bits/stdc++.h>
using namespace std;
char s[200222];
int main() {
  while (scanf("%s", s) > 0) {
    int n = strlen(s);
    int a, b, c;
    a = b = c = 0;
    for (int i = 0; i < n; i++) {
      if (s[i] == '0')
        a++;
      else if (s[i] == '1')
        b++;
    }
    int fst = (n - 1) / 2;
    int snd = (n - 2) / 2;
    if (b <= fst) puts("00");
    if (a <= snd + 1 && b + (s[n - 1] == '?') <= fst + 1 && s[n - 1] != '0')
      puts("01");
    if (b <= fst + 1 && a + (s[n - 1] == '?') <= snd + 1 && s[n - 1] != '1')
      puts("10");
    if (a <= snd) puts("11");
  }
  return 0;
}
