X,N,M = map(int,input().split(" ")) A_list = [int(x) for x in input().split(" ")] B_list = [int(x) for x in input().split(" ")] if X in A_list and X in B_list : print("MrMaxValu") elif X in A_list: print("MrMax") elif X in B_list: print("MaxValu") else: print("-1")