#include <bits/stdc++.h>
using namespace std;
const int SIZE = 100005;
char s[SIZE];
int main() {
  scanf("%s", s);
  int n = strlen(s);
  int jed = 0, zer = 0, pyt = 0;
  for (typeof(0) i = (0); i < (n); ++i) switch (s[i]) {
      case '0':
        ++zer;
        break;
      case '1':
        ++jed;
        break;
      case '?':
        ++pyt;
        break;
    }
  if (zer + pyt > jed) printf("00\n");
  int max_jed = n & 1 ? n / 2 + 1 : n / 2;
  int max_zer = n / 2;
  if (jed <= max_jed && zer <= max_zer) {
    switch (s[n - 1]) {
      case '1':
        printf("01\n");
        break;
      case '0':
        printf("10\n");
        break;
      case '?':
        if (jed < max_jed) printf("01\n");
        if (zer < max_zer) printf("10\n");
        break;
    }
  }
  if (jed + pyt > zer + 1) printf("11\n");
  return 0;
}
