import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int n = sc.nextInt(); int m = sc.nextInt(); String ans = "Max"; for (int i = 0; i < n; i++) { if (x == sc.nextInt()) { ans = "Mr" + ans; } } for (int i = 0; i < m; i++) { if (x == sc.nextInt()) { ans = ans + "Valu"; } } if (ans.equals("Max")) { ans = "-1"; } System.out.println(ans); } }