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