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