#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  string str;
  cin >> str;
  int a = 0, b = 0, c = 0;
  for (char ch : str) a += ch == '0', b += ch == '1', c += ch == '?';
  if (a + c > b) puts("00");
  int l = str.back(), i = str.size() & 1;
  if (l != '0') {
    if (l == '?') b++, c--;
    int x = (a + c - b + i) / 2;
    if (x >= 0 && x <= c) puts("01");
    if (l == '?') b--, c++;
  }
  if (l != '1') {
    if (l == '?') a++, c--;
    int x = (a + c - b + i) / 2;
    if (x >= 0 && x <= c) puts("10");
    if (l == '?') a--, c++;
  }
  if (b + c > a + 1) puts("11");
}
