x, n, m = map(int, input().split()) MrMax = list(map(int, input().split())) MaxValu = list(map(int, input().split())) if x in MrMax and x in MaxValu: print('MrMaxValu') elif x in MrMax: print('MrMax') elif x in MaxValu: print('MaxValu') else: print(-1)