#include <bits/stdc++.h>
using namespace std;
int one, zero, ndef;
string s;
int main() {
  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
      ndef++;
  bool f = (s[n - 1] == '?');
  if (zero - one + ndef >= 1) cout << "00" << endl;
  if ((s[n - 1] == '1' || f) && zero + ndef - f >= one + f - 1 &&
      one + ndef >= zero)
    cout << "01" << endl;
  if ((s[n - 1] == '0' || f) && zero + ndef >= one - 1 &&
      one + ndef - f >= zero + f)
    cout << "10" << endl;
  if (one - zero + ndef >= 2) cout << "11" << endl;
  return 0;
}
