#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-7;
const int inf = 0x3f3f3f3f;
const int hinf = 0x3f3f3f3f;
const long long mod = 1000000007;
char s[100010];
int n;
int main() {
  scanf("%s", s);
  n = strlen(s);
  int a, b, c;
  a = 0;
  b = 0;
  c = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '1')
      a++;
    else if (s[i] == '0')
      b++;
    else
      c++;
  }
  if (a < b + c) puts("00");
  int ff = 0;
  if (a + c > b + 1) ff = 1;
  if ((a < b && a + c < b) || (a > b + 1 && a > b + 1 + c)) {
  } else {
    if (s[n - 1] == '1')
      puts("01");
    else if (s[n - 1] == '0')
      puts("10");
    else {
      c--;
      if (!(a + 1 > b + 1 && a + 1 > b + 1 + c)) {
        puts("01");
      }
      if (!(a < b + 1 && a + c < b + 1)) {
        puts("10");
      }
    }
  }
  if (ff) puts("11");
}
