x,n,m = map(int,input().split()) a = list(map(int,input().split())) b = list(map(int,input().split())) flag_a = 0 flag_b = 0 for i in range(n): if x == a[i]: flag_a = 1 for i in range(m): if x == b[i]: flag_b = 1 if flag_a == 1 and flag_b == 0: print("MrMaxValu") elif flag_a == 0 and flag_b == 1: print("MaxValu") elif flag_a == 1 and flag_b == 1: print("MrMaxValu") else: print("-1")