X, N, M = map(int, input().split()) A = list(map(int, input().split())) B = list(map(int, input().split())) if X in A: mr_max = True else: mr_max = False if X in B: maxvalue = True else: maxvalue = False if mr_max and maxvalue: print("MrMaxValu") elif mr_max: print("MrMax") elif maxvalue: print("MaxValu") else: print("-1")