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 and x not in b: print("MrMax") elif x not in a and x in b: print("MaxValu") else: print(-1)