using System; public class Hello { static void Main() { string[] line = Console.ReadLine().Trim().Split(' '); var x = int.Parse(line[0]); var n = int.Parse(line[1]); var m = int.Parse(line[2]); line = Console.ReadLine().Trim().Split(' '); var a = Array.ConvertAll(line, int.Parse); line = Console.ReadLine().Trim().Split(' '); var b = Array.ConvertAll(line, int.Parse); Console.WriteLine(getAns(x, n, m, a, b)); } static bool search(int n, int[] a, int t) { for (int i = 0; i < n; i++) if (a[i] == t) return true; return false; } static string getAns(int x, int n, int m, int[] a, int[] b) { var aa = search(n, a, x); var bb = search(m, b, x); if (aa && bb) return "MrMaxValu"; if (aa) return "MrMax"; if (bb) return "MaxValu"; return "-1"; } }