#include <bits/stdc++.h>
using namespace std;
double eps = 1e-9;
const int mod = 1e9 + 7;
const int N = 100005;
string s;
int n;
int main() {
  ;
  cin >> s;
  n = s.size();
  int o, z, q;
  o = z = q = 0;
  for (int i = 0; i < n; ++i) {
    if (s[i] == '0') z++;
    if (s[i] == '1') o++;
    if (s[i] == '?') q++;
  }
  if (n % 2 == 1) o--;
  if (z + q >= o + 1) printf("00\n");
  if ((s[n - 1] == '1' && abs(o - z) <= q) ||
      (s[n - 1] == '?' && abs((o + 1) - z) <= (q - 1)))
    printf("01\n");
  if ((s[n - 1] == '0' && abs(o - z) <= q) ||
      (s[n - 1] == '?' && abs(o - (z + 1)) <= (q - 1)))
    printf("10\n");
  if (o + q >= z + 2) printf("11\n");
  return 0;
}
