#include <bits/stdc++.h>
using namespace std;
int cnt_of_ones = 0;
int cnt_of_zeros = 0;
int cnt_of_ques = 0;
int cnt_ques_side = 0;
int cnt_ones_side = 0;
bool i00, i01, i10, i11;
int main() {
  string s;
  cin >> s;
  for (int i = 0; i < s.size(); i++)
    if (s[i] == '0')
      cnt_of_zeros++;
    else if (s[i] == '1')
      cnt_of_ones++;
    else if (s[i] == '?')
      cnt_of_ques++;
  if (cnt_of_zeros + cnt_of_ques > cnt_of_ones) i00 = true;
  if (cnt_of_ones + cnt_of_ques >= cnt_of_zeros + 2) i11 = true;
  int a = s.size() / 2 - cnt_of_zeros;
  int b = (s.size() + 1) / 2 - cnt_of_ones;
  if (a >= 0 && b >= 0) {
    if (s[s.size() - 1] == '1' || s[s.size() - 1] == '?' && b) i01 = true;
    if (s[s.size() - 1] == '0' || s[s.size() - 1] == '?' && a) i10 = true;
  }
  if (i00) cout << "00" << endl;
  if (i01) cout << "01" << endl;
  if (i10) cout << "10" << endl;
  if (i11) cout << "11" << endl;
  return 0;
}
