X,N,M = map(int,input().split()) A = list(map(int,input().split())) B = list(map(int,input().split())) mrmax = 0 maxval = 0 for a in A: if X == a:mrmax = 1 for b in B: if X == b:maxval = 1 if mrmax and not maxval:ans = "MrMax" elif maxval and not mrmax:ans = "MaxValu" else:ans = "MrMaxValu" print(ans)