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