package main import ( "bufio" "fmt" "os" "strconv" ) func nextInt(sc *bufio.Scanner) int { sc.Scan() t, _ := strconv.Atoi(sc.Text()) return t } func main() { sc := bufio.NewScanner(os.Stdin) sc.Split(bufio.ScanWords) X := nextInt(sc) N := nextInt(sc) M := nextInt(sc) var v int var ok1, ok2 bool for i := 0; i < N; i++ { v = nextInt(sc) if v == X { ok1 = true } } for i := 0; i < M; i++ { v = nextInt(sc) if v == X { ok2 = true } } var ans string if ok1 && ok2 { ans = "MrMaxValu" } else if ok1 { ans = "MrMax" } else if ok2 { ans = "MaxValu" } else { ans = "-1" } fmt.Println(ans) }