#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-6;
const int INF = 0x3f3f3f3f;
const int N = 105;
string s;
set<string> st;
int main() {
  while (cin >> s) {
    st.clear();
    int k1 = 0, k0 = 0, k = 0;
    for (unsigned int i = 0; i < s.size(); ++i) {
      if (s[i] == '0') ++k0;
      if (s[i] == '1') ++k1;
      if (s[i] == '?') ++k;
    }
    int mas = (s.size() - 2 + 1) / 2;
    int pet = (s.size() - 2) / 2;
    if (k0 + k >= pet + 2) st.insert("00");
    if (k1 + k >= mas + 2) st.insert("11");
    if (k0 <= pet + 1 && k1 <= mas + 1) {
      int n = s.size();
      if (s[n - 1] == '0') st.insert("10");
      if (s[n - 1] == '1') st.insert("01");
      if (s[n - 1] == '?') {
        if (k1 < mas + 1) st.insert("01");
        if (k0 < pet + 1) st.insert("10");
      }
    }
    for (set<string>::iterator it = st.begin(); it != st.end(); ++it) {
      cout << (*it) << endl;
    }
  }
  return 0;
}
