#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long powm(long long base, long long exp, long long mod = 1000000007) {
  base %= mod;
  long long ans = 1;
  while (exp) {
    if (exp & 1LL) ans = (ans * base) % mod;
    exp >>= 1LL, base = (base * base) % mod;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s;
  int n = s.size();
  int z = 0, o = 0, q = 0;
  for (auto it : s)
    if (it == '0')
      z++;
    else if (it == '1')
      o++;
    else
      q++;
  if (o + 1 <= z + q) cout << "00" << '\n';
  if (n % 2 == 0 && o <= n / 2 && z <= n / 2 && s[n - 1] != '0') {
    if (s[n - 1] == '1' || o < n / 2) cout << "01" << '\n';
  }
  if (n % 2 == 1 && o <= (n + 1) / 2 && z <= n / 2 && s[n - 1] != '0') {
    if (s[n - 1] == '1' || o < (n + 1) / 2) cout << "01" << '\n';
  }
  if (n % 2 == 0 && o <= n / 2 && z <= n / 2 && s[n - 1] != '1') {
    if (s[n - 1] == '0' || z < n / 2) cout << "10" << '\n';
  }
  if (n % 2 == 1 && o <= (n + 1) / 2 && z <= n / 2 && s[n - 1] != '1') {
    if (s[n - 1] == '0' || z < n / 2) cout << "10" << '\n';
  }
  if (o + q >= z + 2) cout << "11" << '\n';
}
