x,n,m = map(int,input().split()) a = set(map(int,input().split())) b = set(map(int,input().split())) x_set = {x} if x_set & a: print("MrMaxValu") elif x_set & b: print("MaxValu") else: print(-1)