#include <bits/stdc++.h>
using namespace std;
const int maxN = 100000 + 10;
int A, B, C;
int N, M, L;
char a[maxN];
int main() {
  while (cin >> a[L]) {
    if (a[L] == '1') ++A;
    if (a[L] == '0') ++B;
    if (a[L] == '?') ++C;
    ++L;
  }
  M = (L - 2) / 2;
  N = L - 2 - M;
  if (A <= N) cout << "00" << endl;
  if (A <= N + 1 && A + C >= N + 1) {
    if (A == N + 1) {
      if (a[L - 1] == '1') cout << "01" << endl;
    } else if (a[L - 1] == '1' || a[L - 1] == '?')
      cout << "01" << endl;
    if (A + C == N + 1) {
      if (a[L - 1] == '0') cout << "10" << endl;
    } else if (a[L - 1] == '0' || a[L - 1] == '?')
      cout << "10" << endl;
  }
  if (B <= M) cout << "11" << endl;
  return 0;
}
