#include #include #include #include #include #include #include using namespace std; int main() { char c[3]; int j; for (int i = 0; i < 3; i++) { cin >> c[i]; if (c[i] == '?') j = i; } string s; for (int i = 0; i < 2; i++) { char t = i == 0 ? '1' : '4'; c[j] = t; if ((c[1] < c[0] && c[1] < c[2]) || (c[1] > c[0] && c[1] > c[2])) s += t; } cout << s << endl; return 0; }