#include <bits/stdc++.h>
int c0, c1, cx;
char s[100005];
int main() {
  int i, len, half;
  scanf("%s", s);
  len = strlen(s);
  for (i = 0; i < len; i++) {
    if (s[i] == '0') c0++;
    if (s[i] == '1') c1++;
    if (s[i] == '?') cx++;
  }
  if ((c0 + c1 + cx) % 2 == 1) c1--;
  half = (c0 + c1 + cx) / 2;
  if (c0 + cx > c1) printf("00\n");
  if (c0 <= half && c1 <= half) {
    if (s[len - 1] == '1' || (s[len - 1] == '?' && c1 < half)) printf("01\n");
    if (s[len - 1] == '0' || (s[len - 1] == '?' && c0 < half)) printf("10\n");
  }
  if (c1 + cx > c0) printf("11\n");
  return 0;
}
