import java.util.*; import java.io.*; public class Main{ public static void main(String[] args){ FastScanner fsc=new FastScanner(); int X =fsc.nextInt(); int N =fsc.nextInt(); int M =fsc.nextInt(); int OK_A = 0; int OK_B = 0; for (int i = 0; i < N; i++) { int A = fsc.nextInt(); if (A == X) { OK_A = 1; } } for (int i = 0; i < M; i++) { int B = fsc.nextInt(); if (B == X) { OK_B = 1; } } fsc.close(); if (OK_A == 1 && OK_B == 1 ) { System.out.println("MrMaxValu"); } else if (OK_A == 1 && OK_B == 0) { System.out.println("MrMax"); } else if (OK_A == 0 && OK_B == 1) { System.out.println("MaxValu"); } else { System.out.println("-1"); } } static class FastScanner { private final InputStream in = System.in; private final byte[] buffer = new byte[1024]; private int ptr = 0; private int buflen = 0; private boolean hasNextByte(){ if(ptr Integer.MAX_VALUE) throw new NumberFormatException(); return (int) nl; } public double nextDouble() { return Double.parseDouble(next());} public void close(){ try{in.close();} catch(IOException e){e.printStackTrace();} } } }