x,n,m = map(int,input().split()) A = list(map(int,input().split())) B = list(map(int,input().split())) flag = 0 if x in A: flag += 1 if x in B: flag += 2 if flag == 3: print("MrMaxValu") elif flag == 2: print("MaxValu") elif flag == 1: print("MrMax") else: print("-1")