#include #include #include using namespace std; int main() { int X, N, M; cin >> X; cin >> N; cin >> M; int tmp; vector vc_N, vc_M; for (int i = 0; i < N; i++) { cin >> tmp; vc_N.push_back(tmp); } for (int i = 0; i < M; i++) { cin >> tmp; vc_M.push_back(tmp); } int cnt_N = count(vc_N.begin() ,vc_N.end(), X); int cnt_M = count(vc_M.begin(), vc_M.end(), X); if (cnt_N > 0 && cnt_M > 0) { cout << "MrMaxValu" << "\n"; } else if (cnt_N > 0) { cout << "MrMax" << "\n"; } else if (cnt_M > 0) { cout << "MaxValu" << "\n"; } else { cout << "-1" << "\n"; } return 0; }