x, m, n = map(int, input().split()) A = set(list(map(int, input().split()))) B = set(list(map(int, input().split()))) if x in A and x in B: print('MrMaxValu') elif x in A and x not in B: print('MrMax') elif x not in A and x in B: print('MaxValu') else: print(-1)