#include <bits/stdc++.h>
using namespace std;
string s;
int main() {
  ios::sync_with_stdio(false);
  cin >> s;
  int n = s.size();
  int first = (n - 2 + 1) / 2, second = n - 2 - first;
  int ones = 0, zeros = 0, questions = 0;
  for (int i = 0; i < s.size(); ++i) {
    if (s[i] == '0') ++zeros;
    if (s[i] == '1') ++ones;
    if (s[i] == '?') ++questions;
  }
  if (ones <= first) cout << "00" << endl;
  if (ones <= first + 1 && ones + questions >= first + 1) {
    if (s[s.size() - 1] == '1' ||
        (s[s.size() - 1] == '?' && ones + 1 <= first + 1))
      cout << "01" << endl;
    if (s[s.size() - 1] == '0' ||
        (s[s.size() - 1] == '?' && zeros + 1 <= second + 1))
      cout << "10" << endl;
  }
  if (ones + questions >= first + 2) cout << "11" << endl;
  return 0;
}
