#include #include #include #include using namespace std; int main() { int X, N, M; cin >> X >> N >> M; int flg = 0; int temp = 0; for (int i = 0; i < N; i++) { cin >> temp; if (temp == X) { flg = 1; } } for (int i = 0; i < M; i++) { cin >> temp; if (temp == X) { if (flg == 0) { flg = 2; } else { flg = 3; } } } if (flg == 1) { cout << "MrMax" << endl; } else if (flg == 2) { cout << "MaxValu" << endl; } else if (flg == 3) { cout << "MrMaxValu" << endl; } else { cout << -1 << endl; } return 0; }