x, n, m = map(int, input().split()) a = [int(_) for _ in input().split()] b = [int(_) for _ in input().split()] aa, bb = False, False for i in a: if i == x: aa = True break for i in b: if i == x: bb = True break if aa and bb: print('MrMaxValu') elif aa and (not bb): print('MrMax') elif (not aa) and bb: print('MaxValu') else: print(-1)