#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int z = 0, o = 0, q = 0, v, m;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '0') z++;
    if (s[i] == '1') o++;
    if (s[i] == '?') q++;
  }
  v = s.size() / 2 - 1;
  m = v + s.size() % 2;
  if (o <= m) cout << "00" << endl;
  if (s[s.size() - 1] != '0' && z <= v + 1)
    if (o + bool(s[s.size() - 1] == '?') <= m + 1) cout << "01" << endl;
  if (s[s.size() - 1] != '1' && o <= m + 1)
    if (z + bool(s[s.size() - 1] == '?') <= v + 1) cout << "10" << endl;
  if (z <= v) cout << "11" << endl;
}
