X, N, M = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) cnt = [0, 0] cnt[0] = a.count(X) cnt[1] = b.count(X) if cnt[0] == 1 and cnt[1] == 1: print('MrMaxValu') elif cnt[0] == 1: print('MrMax') elif cnt[1] == 1: print('MaxValu') else: print(-1)