#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100100;
int N;
int one, zero, unkn;
char ar[MAXN];
bool eq(int a, int b) { return N / 2 >= a && N - N / 2 >= b; }
int main() {
  ios_base::sync_with_stdio(false);
  cin >> ar + 1;
  N = strlen(ar + 1);
  for (int i = 1; i <= N; i++)
    if (ar[i] == '1')
      one++;
    else if (ar[i] == '0')
      zero++;
    else
      unkn++;
  if (zero + unkn > one + 1 - N % 2) puts("00");
  if (ar[N] == '1' && eq(zero, one))
    puts("01");
  else if (ar[N] == '?' && eq(zero, one + 1))
    puts("01");
  if (ar[N] == '0' && eq(zero, one))
    puts("10");
  else if (ar[N] == '?' && eq(zero + 1, one))
    puts("10");
  if (one + unkn > zero + 1) puts("11");
  return 0;
}
