#include <bits/stdc++.h>
using namespace std;
char str[100005];
int cnt[3];
int main() {
  while (scanf("%s", str) != EOF) {
    int len = strlen(str);
    memset(cnt, 0, sizeof(cnt));
    for (int i = 0; i < len; i++) {
      if (str[i] == '0') {
        cnt[0]++;
      } else if (str[i] == '1') {
        cnt[1]++;
      } else {
        cnt[2]++;
      }
    }
    int n = len / 2;
    cnt[1] -= len % 2;
    if (cnt[0] + cnt[2] >= n + 1) {
      puts("00");
    }
    if (cnt[1] == n && str[len - 1] == '1' ||
        cnt[1] < n && cnt[1] + cnt[2] >= n &&
            (str[len - 1] == '1' || str[len - 1] == '?')) {
      puts("01");
    }
    if (cnt[0] == n && str[len - 1] == '0' ||
        cnt[0] < n && cnt[0] + cnt[2] >= n &&
            (str[len - 1] == '0' || str[len - 1] == '?')) {
      puts("10");
    }
    if (cnt[1] + cnt[2] >= n + 1) {
      puts("11");
    }
  }
  return 0;
}
