import java.util.Scanner; public class Main { public static void main(String[] args) { new Main(); } public Main() { try (Scanner sc = new Scanner(System.in)) { int X = sc.nextInt(), N = sc.nextInt(), M = sc.nextInt(); int find = 0; for (int i = 0;i < N;++ i) if (X == sc.nextInt()) find |= 1; for (int i = 0;i < M;++ i) if (X == sc.nextInt()) find |= 2; switch(find) { case 0: System.out.println(-1); break; case 1: System.out.println("MrMax"); break; case 2: System.out.println("MaxValu"); break; case 3: System.out.println("MrMaxValu"); } } } }