x,n,m=map(int,input().split()) a=list(map(int,input().split())) b=list(map(int,input().split())) mr = 0 valu = 0 for i in range(n): if a[i]==x: mr = 1 for i in range(m): if b[i]==x: valu = 1 if mr: if valu: print("MrMaxValu") else: print("MrMax") else: if valu: print("MaxValu") else: print("-1")