#include <bits/stdc++.h>
double eps = 1e-9;
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  string s;
  cin >> s;
  int a = 0, b = 0, c = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '0') {
      b++;
    } else if (s[i] == '1') {
      a++;
    } else {
      c++;
    }
  }
  int mturn = (s.size() - 1) / 2;
  if (mturn >= a) {
    cout << "00\n";
  }
  if (mturn >= a - 1 && mturn <= a + c - 1) {
    if (s[s.size() - 1] == '?') {
      if (mturn == a + c - 1) {
        cout << "01\n";
      } else if (mturn == a - 1) {
        cout << "10\n";
      } else {
        cout << "01\n10\n";
      }
    } else if (s[s.size() - 1] == '1') {
      cout << "01\n";
    } else {
      cout << "10\n";
    }
  }
  if (a + c - mturn >= 2) {
    cout << "11\n";
  }
  return 0;
}
