X, N, M = map(int, input().split()) A = list(map(int, input().split())) B = list(map(int, input().split())) A = set(A) B = set(B) 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)