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