x,n,m = map(int,input().split()) A = list(map(int,input().split())) B = list(map(int,input().split())) f1 = True if x in A else False f2 = True if x in B else False if f1 and f2: print('MrMaxValu') elif f1: print('MrMax') elif f2: print('MaxValu') else: print(-1)