import java.util.*; import java.io.*; import java.math.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int n = sc.nextInt(); int m = sc.nextInt(); String ans = ""; for(int i = 0; i < n; i++){ if(x == sc.nextInt()){ ans += "MrMax"; break; } } for(int i = 0; i < n; i++){ if(x == sc.nextInt()){ if(!ans.isEmpty()){ ans += "Valu"; }else{ ans += "MaxValu"; } break; } } if(!ans.isEmpty()){ System.out.println(ans); }else{ System.out.println(-1); } } }