#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  cin >> str;
  int one, zero, ques;
  one = zero = ques = 0;
  for (int i = 0; i < (int)str.size(); i++) {
    if (str[i] == '?')
      ques++;
    else if (str[i] == '0')
      zero++;
    else
      one++;
  }
  set<string> res;
  for (int i = 0; i <= ques; i++) {
    int curZero = zero + ques - i;
    int curOne = one + i;
    if (curZero >= curOne + 1)
      res.insert("00");
    else if (curZero + 1 < curOne)
      res.insert("11");
    else {
      if (str[str.size() - 1] == '0')
        res.insert("10");
      else if (str[str.size() - 1] == '1')
        res.insert("01");
      else {
        if (i >= 1) res.insert("01");
        if (ques - i >= 1) res.insert("10");
      }
    }
  }
  for (set<string>::iterator it = res.begin(); it != res.end(); it++) {
    cout << *it << endl;
  }
  return 0;
}
