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