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