#include<bits/stdc++.h>

#define ll long long
#define fornum(A,B,C) for(A=B;A<C;++A)
#define pii pair<int,int>
#define pll pair<ll,ll>

using namespace std;

/////////////////////////////////////////////////////
ll X, N, M, A[101010], B[101010];
ll i, j, k;
int main(){
    scanf("%lld%lld%lld", &X, &N,&M);
    ll a = 0;
    fornum(i,0,N){
        scanf("%lld", &A[i]);
        if(X==A[i])
            a |= 1;
    }
    fornum(i,0,M){
        scanf("%lld", &B[i]);
        if(X==B[i])
            a |= 2;
    }
    if(a==0){
        printf("-1");
    }else if(a==1){
        printf("MrMax");
    }else if(a==2){
        printf("MaxValu");
    }else{
        printf("MrMaxValu");
    }
    return 0;
}