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