X,N,M=map(int,input().split()) A=list(map(int,input().split())) B=list(map(int,input().split())) bool1=X in A bool2=X in B if bool1 == True and bool2 == True: print('MrMaxValu') elif bool1==True and bool2==False: print('MrMax') elif bool1==False and bool2==True: print('MaxValu') else: print(-1)