X, N, M = list(map(int, input().split())) A = list(map(int, input().split())) B = list(map(int, input().split())) A = list(set(A)) B = list(set(B)) in_a = A.count(X) in_b = B.count(X) if in_a and in_b: print('MrMaxValu') elif in_a: print('MrMax') elif in_b: print('MaxValu') else: print(-1)