import sys readline=sys.stdin.readline X,N,M=map(int,readline().split()) A=X in map(int,readline().split()) B=X in map(int,readline().split()) if A and B: ans="MrMaxValu" elif A: ans="MrMax" elif B: ans="MaxValu" else: ans=-1 print(ans)