x,n,m=map(int,input().split()) a_l=list(map(int,input().split())) b_l=list(map(int,input().split())) ans=-1 for i in a_l: if i==x:ans+=3 for j in b_l: if j==x:ans+=5 print("MrMax" if ans==3-1 else "MaxValu" if ans==5-1 else "MrMaxValu" if ans==8-1 else -1)