#include <bits/stdc++.h>
using namespace std;
char g_sz[100010];
int g_cnt[4];
int main() {
  int i, j, n, m;
  scanf("%s", g_sz);
  int len = strlen(g_sz);
  for (i = 0; g_sz[i]; i++) {
    if (g_sz[i] == '0')
      g_cnt[0]++;
    else if (g_sz[i] == '1')
      g_cnt[1]++;
    else
      g_cnt[2]++;
  }
  int xqu = (len >> 1) + (len & 0x1) - 1;
  int hqu = (len >> 1) - 1;
  int half = (len >> 1), mhalf = (len >> 1) + (len & 0x1);
  if (g_cnt[0] + g_cnt[2] > half) puts("00");
  if (g_cnt[0] <= half && g_cnt[1] <= mhalf) {
    if ((g_sz[len - 1] == '?' && g_cnt[1] < mhalf) || g_sz[len - 1] == '1')
      puts("01");
    if ((g_sz[len - 1] == '?' && g_cnt[0] < half) || g_sz[len - 1] == '0')
      puts("10");
  }
  if (g_cnt[1] + g_cnt[2] > mhalf) puts("11");
}
