import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines X,N,M = map(int,readline().split()) *A, = map(int,readline().split()) *B, = map(int,readline().split()) in_A = X in A in_B = X in B if in_A and (not in_B): answer = 'MrMax' elif in_B and (not in_A): answer = 'MaxValu' elif in_A and in_B: answer = 'MrMaxValu' else: answer = -1 print(answer)