#include <bits/stdc++.h>
using namespace std;
inline void pisz(int n) { printf("%d\n", n); }
template <typename T, typename TT>
ostream& operator<<(ostream& s, pair<T, TT> t) {
  return s << "(" << t.first << "," << t.second << ")";
}
template <typename T>
ostream& operator<<(ostream& s, vector<T> t) {
  for (int(i) = 0; (i) < (((int)(t.size()))); ++(i)) s << t[i] << " ";
  return s;
}
int main() {
  ios_base::sync_with_stdio(0);
  string s;
  cin >> s;
  int n = ((int)(s.size()));
  const int n1 = count(s.begin(), s.end(), '1'),
            n0 = count(s.begin(), s.end(), '0'), rest = n - n0 - n1,
            all0 = n1 - (n0 + rest), all1 = (n1 + rest) - n0;
  if (all0 < 0) printf("00\n");
  if ((0 >= all0 && 0 <= all1) || (1 >= all0 && 1 <= all1)) {
    int last0 = -1, last1 = -1, lastp = -1;
    for (int(i) = 0; (i) < (n); ++(i)) {
      if (s[i] == '0') last0 = i;
      if (s[i] == '1') last1 = i;
      if (s[i] == '?') lastp = i;
    }
    if (all0 == 0 || all0 == 1) {
      last0 = max(last0, lastp);
      lastp = -1;
    } else if (all1 == 1 || all1 == 0) {
      last1 = max(last1, lastp);
      lastp = -1;
    }
    if (max(last1, lastp) > last0) printf("01\n");
    if (max(last0, lastp) > last1) printf("10\n");
  }
  if (all1 > 1) printf("11\n");
}
