#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
bool isPowerOfTwo(int x) { return x && (!(x & (x - 1))); }
void fast() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
long long int power(long long int x, long long int y, long long int p) {
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long int modInverse(long long int n, long long int p) {
  return power(n, p - 2, p);
}
long long int ncr(long long int n, long long int r, long long int p) {
  if (r == 0) return 1;
  long long int fac[n + 1];
  fac[0] = 1;
  for (long long int i = 1; i <= n; i++) fac[i] = fac[i - 1] * i % p;
  return (fac[n] * modInverse(fac[r], p) % p * modInverse(fac[n - r], p) % p) %
         p;
}
int main() {
  int x = 0, y = 0, a = 0, p, q, r;
  string s;
  cin >> s;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '0') {
      y++;
    } else if (s[i] == '1') {
      x++;
    } else {
      a++;
    }
  }
  if (x < (y + a)) {
    cout << "00" << '\n';
  }
  if (s[s.length() - 1] == '?') {
    if (y <= s.length() / 2 && x <= ((s.length() + 1) / 2 - 1)) {
      cout << "01" << '\n';
    }
  }
  if (s[s.length() - 1] == '1' && y <= s.length() / 2 &&
      x <= (s.length() + 1) / 2) {
    cout << "01" << '\n';
  }
  if (s[s.length() - 1] == '?') {
    if (y <= (s.length() / 2 - 1) && x <= ((s.length() + 1) / 2)) {
      cout << "10" << '\n';
    }
  }
  if (s[s.length() - 1] == '0' && y <= s.length() / 2 &&
      x <= (s.length() + 1) / 2) {
    cout << "10" << '\n';
  }
  if ((y + 1) < x + a) {
    cout << "11" << '\n';
  }
}
