X, N, M = map(int, input().split()) A = list(map(int, input().split())) B = list(map(int, input().split())) print([-1, 'MrMax', 'MaxValu', 'MrMaxValu'][(X in A) + ((X in B) << 1)])