#include <bits/stdc++.h>
using namespace std;
long long i, j, k, l, m, n, a, t, t1, b, c[1111], s, d[11], e[11];
string p;
vector<string> q;
int main() {
  cin >> p;
  l = p.size();
  for (i = 0; i < l; i++) {
    if (p[i] == '0') a++;
    if (p[i] == '1') b++;
  }
  k = (l - 1) / 2;
  m = l / 2 - 1;
  if (l - a <= k) {
    cout << "00" << endl;
    return 0;
  }
  if (l - b <= m) {
    cout << "11" << endl;
    return 0;
  }
  if (l - a >= k + 2 && l - b >= m + 2) {
    if (p[l - 1] == '?') {
      cout << "00" << endl;
      cout << "01" << endl;
      cout << "10" << endl;
      cout << "11" << endl;
      return 0;
    }
    if (p[l - 1] == '0') {
      cout << "00" << endl;
      cout << "10" << endl;
      cout << "11" << endl;
      return 0;
    }
    if (p[l - 1] == '1') {
      cout << "00" << endl;
      cout << "01" << endl;
      cout << "11" << endl;
      return 0;
    }
  }
  if (l - a == k + 1 && l - b == m + 1) {
    if (p[l - 1] == '0')
      cout << "10";
    else
      cout << "01";
    return 0;
  }
  if (l - a == k + 1) {
    if (p[l - 1] == '0') {
      cout << "00" << endl << "10";
      return 0;
    }
    cout << "00" << endl << "01";
    return 0;
  }
  if (p[l - 1] == '1') {
    cout << "01" << endl << "11";
    return 0;
  }
  cout << "10" << endl << "11";
}
