#include <bits/stdc++.h>
using namespace std;
char str[500000];
int tam;
int main() {
  int um = 0;
  int zero = 0;
  scanf("%s", str);
  tam = strlen(str);
  for (int i = 0; i < tam; i++) {
    if (str[i] == '0') zero++;
    if (str[i] == '1') um++;
  }
  tam--;
  if (tam / 2 >= um) cout << "00" << endl;
  if ((tam / 2 >= um - 1) && ((tam - 1) / 2 >= zero - 1)) {
    if (str[tam] == '1') cout << "01" << endl;
    if (str[tam] == '0') cout << "10" << endl;
    if (str[tam] == '?') {
      if (tam / 2 >= um) cout << "01" << endl;
      if ((tam - 1) / 2 >= zero) cout << "10" << endl;
    }
  }
  if ((tam - 1) / 2 >= zero) cout << "11" << endl;
  return 0;
}
