#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100010;
char s[MAXN];
int n;
void solve() {
  int n1 = (n - 1) / 2, n0 = (n - 2) / 2;
  int a = 0, b = 0, c = 0;
  for (int i = 0; i < n; ++i)
    if (s[i] == '?')
      ++c;
    else if (s[i] == '1')
      ++a;
    else
      ++b;
  if (n1 >= a) puts("00");
  int m1 = n1 + 1 - a, m0 = n0 + 1 - b;
  if (m1 >= 0 && m0 >= 0) {
    if (s[n - 1] == '1' || (s[n - 1] == '?' && m1)) puts("01");
    if (s[n - 1] == '0' || (s[n - 1] == '?' && m0)) puts("10");
  }
  if (n0 >= b) puts("11");
}
int main() {
  scanf("%s", s);
  n = strlen(s);
  solve();
  return 0;
}
