#include <bits/stdc++.h>
using namespace std;
int main() {
  int a = 0, b = 0, c = 0;
  string s;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '0')
      a++;
    else if (s[i] == '1')
      b++;
    else
      c++;
  }
  int n = s.size();
  int p = n / 2 - 1, q = (n + 1) / 2 - 1;
  if (b <= q) {
    puts("00");
  }
  if (s[n - 1] != '0' && a - 1 <= p && b + (s[n - 1] == '?') - 1 <= q)
    puts("01");
  if (s[n - 1] != '1' && a + (s[n - 1] == '?') - 1 <= p && b - 1 <= q)
    puts("10");
  if (a <= p) puts("11");
}
