import java.util.*; class Main{ public static void main(String[] $){ var s=new Scanner(System.in); int t=s.nextInt(),n=s.nextInt(); s.next(); var a=s.tokens().limit(n).mapToInt(Integer::parseInt).anyMatch(i->i==t)?1:0; var b=s.tokens().mapToInt(Integer::parseInt).anyMatch(i->i==t)?2:0; String[] q= {"-1","MrMax","MaxValu","MrMaxValu"}; System.out.println(q[a+b]); } }