#include <bits/stdc++.h>
using namespace std;
char buff[100100];
long long n;
bool canAchieve(long long a, long long b, long long c) {
  for (long long x = 0; x <= c; x++)
    if (0 <= 2 * x + a - b - c && 2 * x + a - b - c <= 1) return true;
  return false;
}
bool can00(long long a, long long b, long long c) { return a < b + c; }
bool can11(long long a, long long b, long long c) { return a + c > b + 1; }
bool can01(long long a, long long b, long long c) {
  if (buff[n - 1] == '0') return false;
  if (buff[n - 1] == '?') return canAchieve(a + 1, b, c - 1);
  return canAchieve(a, b, c);
}
bool can10(long long a, long long b, long long c) {
  if (buff[n - 1] == '1') return false;
  if (buff[n - 1] == '?') return canAchieve(a, b + 1, c - 1);
  return canAchieve(a, b, c);
}
int main() {
  scanf("%s", &buff);
  n = strlen(buff);
  long long a = 0, b = 0, c = 0;
  for (long long i = 0; i < n; i++)
    if (buff[i] == '1')
      a++;
    else if (buff[i] == '0')
      b++;
    else if (buff[i] == '?')
      c++;
  if (can00(a, b, c)) printf("00\n");
  if (can01(a, b, c)) printf("01\n");
  if (can10(a, b, c)) printf("10\n");
  if (can11(a, b, c)) printf("11\n");
  return 0;
}
