X, N, M = map(int, input().split()) A = list(map(int, input().split())) B = list(map(int, input().split())) if A.__contains__(X) and B.__contains__(X): print("MrMaxValu") elif not A.__contains__(X) and not B.__contains__(X): print(-1) else: if A.__contains__(X): print("MrMax") else: print("MaxValu")