function Main (input) { input = input.split("\n"); var ts1 = input[0].split(" ").map(inp => parseInt(inp, 10)); var A = input[1].split(" ").map(inp => parseInt(inp, 10)); var B = input[2].split(" ").map(inp => parseInt(inp, 10)); var X = ts1[0]; if (A.some(inp => inp == X) && B.some(inp => inp == X)) { console.log("MrMaxValu"); } else if (A.some(inp => inp == X)) { console.log("MrMax"); } else if (B.some(inp => inp == X)) { console.log("MaxValu"); } else { console.log("-1"); } } Main(require("fs").readFileSync("/dev/stdin", "utf8"));