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