import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] sa = br.readLine().split(" "); int x = Integer.parseInt(sa[0]); int n = Integer.parseInt(sa[1]); int m = Integer.parseInt(sa[2]); boolean flg = false; sa = br.readLine().split(" "); for (int i = 0; i < n; i++) { if (x == Integer.parseInt(sa[i])) { flg = true; break; } } sa = br.readLine().split(" "); for (int i = 0; i < m; i++) { if (x == Integer.parseInt(sa[i])) { if (flg) { System.out.println("MrMaxValu"); } else { System.out.println("MaxValu"); } return; } } br.close(); if (flg) { System.out.println("MrMax"); } else { System.out.println("-1"); } } }