X, N, M = map(int, input().split(' ')) MrMax = map(int, input().split(' ')) MaxValue = map(int, input().split(' ')) MrMax_f = 0 MaxValue_f = 0 for x in MrMax: if X == x: MrMax_f = 1 for x in MaxValue: if X == x: MaxValue_f = 1 if MrMax_f == MaxValue_f == 1: print("MrMaxValue") elif MrMax_f == 1: print("MrMax") elif MaxValue_f == 1: print("MaxValue") else: print("-1")