import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner scan = new Scanner(System.in); boolean mr = false; boolean value = false; int i = 0; String appoi = scan.nextLine(); String mrmax = scan.nextLine(); String maxvalue = scan.nextLine(); String[] appoi2 = appoi.split(" "); String[] mrmax2 = mrmax.split(" "); String[] maxvalue2 = maxvalue.split(" "); for(;i < mrmax2.length;i++){ if(appoi2[0].equals(mrmax2[i])){ mr = true; break; } } for(;i < maxvalue2.length;i++){ if(appoi2[0].equals(maxvalue2[i])){ value = true; break; } } if(mr == true && value == false){ System.out.println("MrMax"); }else if(mr == false && value == true){ System.out.println("MaxValu"); }else if(mr == true && value == true){ System.out.println("MrMaxValu"); }else{ System.out.println("-1"); } } }