x, n, m = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) MrMax = a.count(x) MaxValu = b.count(x) if MrMax==1 and MaxValu==1: print("MrMaxValu") elif MrMax==1 and MaxValu==0: print("MrMax") elif MrMax==0 and MaxValu==1: print("MaxValu") else: print("-1")