x, n, m = map(int, input().split()) A = list(map(int, input().split())) B = list(map(int, input().split())) mrmax = False maxvalu = False if x in A: mrmax = True if x in B: maxvalu = True if mrmax: if maxvalu: print("MrMaxValu") else: print("MrMax") else: if maxvalu: print("MaxValu") else: print(-1)