#include using namespace std; int main() { int X, N, M; cin >> X >> N >> M; vector a(N), b(M); for (int i = 0; i < N; ++i) cin >> a[i]; for (int i = 0; i < M; ++i) cin >> b[i]; sort(a.begin(), a.end()); sort(b.begin(), b.end()); auto okA = (find(a.begin(), a.end(), X) != a.end()); auto okB = (find(b.begin(), b.end(), X) != b.end()); if (okA and okB) { cout << "MrMaxValu" << endl; } else if (okA) { cout << "MrMax" << endl; } else if (okB) { cout << "MaxValu" << endl; } else { cout << "-1" << endl; } return 0; }