#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int n = s.length();
  int k0 = 0, k1 = 0;
  for (int i = 0; i < n; ++i)
    if (s[i] == '0')
      ++k0;
    else if (s[i] == '1')
      ++k1;
  if (k1 < n / 2 + n % 2) cout << "00\n";
  if (k0 <= n / 2 && k1 <= n / 2 + n % 2)
    if (s[n - 1] == '1')
      cout << "01\n";
    else if (s[n - 1] == '0')
      cout << "10\n";
    else {
      if (k1 < n / 2 + n % 2) cout << "01\n";
      if (k0 < n / 2) cout << "10\n";
    }
  if (k0 < n / 2) cout << "11\n";
}
