use std::io::Read; fn run() { let mut s = String::new(); std::io::stdin().read_to_string(&mut s).unwrap(); let it = s.trim().split_whitespace(); let a: Vec = it.map(|s| s.parse().unwrap()).collect(); let (x, n, m) = (a[0], a[1], a[2]); let (a, b) = a[3..].split_at(n); assert!(b.len() == m); let ans = match (a.iter().position(|d| *d == x), b.iter().position(|d| *d == x)) { (Some(_), Some(_)) => "MrMaxValu", (Some(_), None) => "MrMax", (None, Some(_)) => "MaxValu", (None, None) => "-1", }; println!("{}", ans); } fn main() { run(); }