one=[int(i) for i in input().split()] two=[int(i) for i in input().split()] ther=[int(i) for i in input().split()] fg1=0 fg2=0 for i in range(one[1]): if one[0]==two[i]: fg1=1 for i in range(one[2]): if one[0]==ther[i]: fg2=1 if fg1==0 and fg2==0: print("-1") elif fg1==1 and fg2==0: print("MrMax") elif fg1==0 and fg2==1: print("MaxValu") else: print("MrMaxValu")