#include <bits/stdc++.h>
using namespace std;
string s;
int a, b, c;
bool ans[4];
int main() {
  cin >> s;
  int len = s.size();
  for (int i = 0; i < len; i++)
    if (s[i] == '0')
      a++;
    else if (s[i] == '1')
      b += 1;
    else
      c++;
  for (int i = 0; i <= c; i++) {
    if (i + a <= (len - 2) / 2)
      ans[3] = true;
    else if (b + c - i <= (len - 2) / 2 + (len) % 2)
      ans[0] = true;
    else {
      if (s[len - 1] == '?') {
        if (i == c)
          ans[2] = true;
        else if (i == 0)
          ans[1] = true;
        else
          ans[1] = ans[2] = true;
      } else if (s[len - 1] == '0')
        ans[2] = true;
      else
        ans[1] = true;
    }
  }
  if (ans[0]) cout << "00" << endl;
  if (ans[1]) cout << "01" << endl;
  if (ans[2]) cout << "10" << endl;
  if (ans[3]) cout << "11" << endl;
  return 0;
}
