X, N, M = map(int, input().split()) b1 = X in map(int, input().split()) b2 = X in map(int, input().split()) if b1 and b2: print("MrMaxValu") elif b1: print("MrMax") elif b2: print('MaxValu') else: print(-1)