x,n,m=map(int,input().split()) a=list(map(int,input().split())) b=list(map(int,input().split())) if a.count(x)+b.count(x)==2: print('MrMaxValu') elif a.count(x)==1: print('MrMax') elif b.count(x)==1: print('MaxValu') else: print(-1)