#include <bits/stdc++.h>
using namespace std;
string s;
int one, zero, other, total;
vector<string> sol;
inline void input() {
  one = zero = other = 0;
  cin >> s;
  total = s.length();
  for (int i = 0; i < s.length(); ++i)
    (s[i] == '1') ? (++one) : (((s[i] == '0') ? ++zero : ++other));
}
inline void solve() {
  if (zero + other >= ((total - 2) >> 1) + 2) sol.push_back("00");
  if ((zero + other > (total - 2) >> 1) && (one + other > (total - 1) >> 1)) {
    if (s[total - 1] == '1' ||
        (s[total - 1] == '?' && (zero + other - 1 > (total - 2) >> 1)))
      sol.push_back("01");
    if (s[total - 1] == '0' ||
        (s[total - 1] == '?' && (one + other - 1 > (total - 1) >> 1)))
      sol.push_back("10");
  }
  if ((one + other) >= (((total - 1) >> 1) + 2)) sol.push_back("11");
}
inline void output() {
  for (int i = 0; i < sol.size(); ++i) cout << sol[i] << "\n";
}
int main() {
  input();
  solve();
  output();
  return 0;
}
