#define _USE_MATH_DEFINES #include //cin, cout #include //vector #include //sort,min,max,count #include //string,getline #include //fixed #include //setprecision #include //swap, pair #include //abs(int) #include //sqrt,ceil,M_PI, pow, sin #include //stringstream,getline #include //gcd, accumlate #include //deque #include //randam_device using namespace std; inline bool Kadomatsu(int a, int b, int c) { if (a == b || b == c || c == a) { return false; } if (b == max({ a, b, c }) || b == min({ a, b, c })) { return true; } else { return false; } } int main() { int a[3]; int idx = 0; string temp; for (int i = 0; i < 3; i++) { cin >> temp; if (temp == "?") { idx = i; } else { a[i] = stoi(temp); } } a[idx] = 1; if (Kadomatsu(a[0], a[1], a[2])) { cout << 1; } a[idx] = 4; if (Kadomatsu(a[0], a[1], a[2])) { cout << 4; } cout << endl; return 0; }