#include <bits/stdc++.h>
using namespace std;
int one, zero, undef;
int main() {
  string s;
  cin >> s;
  int n = s.size();
  for (int i = 0; i < n; ++i)
    if (s[i] == '0')
      ++zero;
    else if (s[i] == '1')
      ++one;
    else
      ++undef;
  int t1 = (n - 2 + 1) / 2;
  int t2 = (n - 2) / 2;
  vector<string> ans;
  if (zero <= t2) ans.push_back("11");
  if (one <= t1) ans.push_back("00");
  if (zero - 1 <= t2 && one - 1 <= t1) {
    if (s[n - 1] == '0') {
      ans.push_back("10");
    } else if (s[n - 1] == '1') {
      ans.push_back("01");
    } else if (zero - 1 == t2) {
      ans.push_back("01");
    } else if (one - 1 == t1) {
      ans.push_back("10");
    } else {
      ans.push_back("01");
      ans.push_back("10");
    }
  }
  sort(ans.begin(), ans.end());
  for (int i = 0; i < ans.size(); ++i) cout << ans[i] << '\n';
}
