#include <bits/stdc++.h>
using namespace std;
const int L = 100005;
char s[L];
int main() {
  int i, n1 = 0, n0 = 0, n = 0, p1, p2;
  cin >> s;
  for (i = 0; s[i]; i++) {
    if (s[i] == '1')
      n1++;
    else if (s[i] == '0')
      n0++;
    else
      n++;
  }
  if (n + n0 > n1) printf("00\n");
  if (n0 <= (n + n0 + n1) / 2 && n1 <= (n + n0 + n1 + 1) / 2) {
    if (s[n + n0 + n1 - 1] == '1' ||
        s[n + n0 + n1 - 1] == '?' && n1 < (n + n0 + n1 + 1) / 2)
      printf("01\n");
    if (s[n + n0 + n1 - 1] == '0' ||
        s[n + n0 + n1 - 1] == '?' && n0 < (n + n0 + n1) / 2)
      printf("10\n");
  }
  if (n + n1 > n0 + 1) printf("11\n");
}
