#include <bits/stdc++.h>
using namespace std;
string s;
int main() {
  int a = 0, b = 0, c = 0;
  cin >> s;
  for (int i = 0; i < s.size(); i++)
    if (s[i] == '1')
      a++;
    else if (s[i] == '0')
      b++;
    else
      c++;
  if (a < b + c) printf("00\n");
  if (a <= b + c + 1 && a + c >= b) {
    if (s[s.size() - 1] == '1' || s[s.size() - 1] == '?' && a + 1 <= b + c)
      printf("01\n");
    if (s[s.size() - 1] == '0' || s[s.size() - 1] == '?' && a + c - 1 >= b + 1)
      printf("10\n");
  }
  if (a + c > b + 1) printf("11\n");
  return 0;
}
