#include using namespace std; using pii = pair; using ll = long long; #define rep(i, j, n) for(int i = j; i < (int)(n); i++) const ll MOD = 1000000007; const ll INFL = (1LL << 60); const int INFI = (1 << 30); int main() { int X, N, M; cin >> X >> N >> M; vector A(100001, 0), B(100001, 0); rep(i, 0, N) { int tmp; cin >> tmp; A.at(tmp)++; } rep(i, 0, M) { int tmp; cin >> tmp; B.at(tmp)++; } if (A.at(X) != 0 && B.at(X) != 0) cout << "MrMaxValu" << endl; else if (A.at(X) != 0 && B.at(X) == 0) cout << "MrMax" << endl; else if (B.at(X) != 0) cout << "MaxValu" << endl; else cout << -1 << endl; }