#include int ri() { int n; scanf("%d", &n); return n; } int main() { int x = ri(); int n = ri(), m = ri(); int a[n], b[m]; for (auto &i : a) i = ri(); for (auto &i : b) i = ri(); bool f1 = std::count(a, a + n, x); bool f2 = std::count(b, b + m, x); const char *res; if (f1 && f2) res = "MrMaxValu"; else if (f1) res = "MrMax"; else if (f2) res = "MaxValu"; else res = "-1"; puts(res); return 0; }