x, n, m = map(int, input().split()) A = list(map(int, input().split())) B = list(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)