#include <bits/stdc++.h>
using namespace std;
char s[100005];
int main() {
  int i, len, n0, n1, w;
  while (~scanf("%s", s)) {
    len = strlen(s);
    n0 = n1 = w = 0;
    for (i = 0; i < len; i++) {
      if (s[i] == '?') n0++, n1++, w++;
      if (s[i] == '0') n0++;
      if (s[i] == '1') n1++;
    }
    if (n0 > len - n0) puts("00");
    if (n0 <= n1 && n0 >= len / 2 || n0 > n1 && n1 >= (len + 1) / 2) {
      if (s[len - 1] == '0')
        puts("10");
      else if (s[len - 1] == '1')
        puts("01");
      else {
        if (n0 - 1 <= n1 && (n0 - 1) >= len / 2 ||
            n0 - 1 > n1 && n1 >= (len + 1) / 2)
          puts("01");
        if (n0 <= n1 - 1 && n0 >= len / 2 ||
            n0 > n1 - 1 && (n1 - 1) >= (len + 1) / 2)
          puts("10");
      }
    }
    if (n1 - (len - n1) > 1) puts("11");
  }
  return 0;
}
