x, n, m = map(int, input().split()) A = set(map(int, input().split())) B = set(map(int, input().split())) if x in A and x in B: print("MrMaxValu") elif x in A: print("MrMax") elif x in B: print("MaxValu") else: print(-1)