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