x,n,m=map(int,input().split()) a=list(map(int,input().split())) b=list(map(int,input().split())) if x in a and x in b: print("MrMaxValu") elif x in a: print("MrMax") elif x in b: print("MaxValu") else: print(-1)