#include <bits/stdc++.h>
using namespace std;
bool canEqual(int one, int zero, int ques) {
  return one > zero && ques >= one - zero - 1 ||
         zero >= one && ques >= zero - one;
}
int main() {
  string s;
  cin >> s;
  int one = 0, zero = 0, ques = 0;
  for (int i = 0; i < s.length(); i++)
    if (s[i] == '1')
      one++;
    else if (s[i] == '0')
      zero++;
    else
      ques++;
  if (ques + zero > one) cout << "00\n";
  if (s[s.length() - 1] == '1' && canEqual(one, zero, ques) ||
      s[s.length() - 1] == '?' && canEqual(one + 1, zero, ques - 1))
    cout << "01\n";
  if (s[s.length() - 1] == '0' && canEqual(one, zero, ques) ||
      s[s.length() - 1] == '?' && canEqual(one, zero + 1, ques - 1))
    cout << "10\n";
  if (ques + one > zero + 1) cout << "11\n";
  return 0;
}
