X,N,M = map(int,input().split()) MM = [int(x) for x in input().split()] MV = [int(x) for x in input().split()] if X in MM and X in MV: print("MrMaxValu") elif X in MM: print("MrMax") elif X in MV: print("MaxValu") else: print(-1)