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: ans = "MrMaxValu" elif X in A: ans = "MrMax" elif X in B: ans = "MaxValu" else: ans = "-1" print(ans)