#include <bits/stdc++.h>
using namespace std;
int main() {
  char str[100009];
  bool flag[4] = {0};
  cin >> str;
  int len = strlen(str), p, q;
  int zero = 0, one = 0, cha = 0;
  if (len % 2) {
    p = (len - 3) / 2;
    q = (len - 1) / 2;
  } else
    p = q = (len - 2) / 2;
  for (int i = 0; i < len; i++) {
    if (str[i] == '0') zero++;
    if (str[i] == '1') one++;
    if (str[i] == '?') cha++;
  }
  if (zero + cha > p && one <= q) flag[0] = true;
  if (one + cha > q && zero <= p) flag[3] = true;
  if (zero <= p + 1 && one <= q + 1) {
    if (zero == p + 1 && str[len - 1] == '0') flag[2] = true;
    if (zero < p + 1 && str[len - 1] != '1') flag[2] = true;
    if (one == q + 1 && str[len - 1] == '1') flag[1] = true;
    if (one < q + 1 && str[len - 1] != '0') flag[1] = true;
  }
  if (flag[0]) cout << "00" << endl;
  if (flag[1]) cout << "01" << endl;
  if (flag[2]) cout << "10" << endl;
  if (flag[3]) cout << "11" << endl;
  return 0;
}
