#include using namespace std; using lint = long long; const lint inf = 1LL << 60; const lint mod = 1000000007; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int x, n, m; cin >> x >> n >> m; set a, b; for (int i = 0; i < n; ++i) { int aa; cin >> aa; a.insert(aa); } for (int i = 0; i < m; ++i) { int bb; cin >> bb; b.insert(bb); } bool mr = a.count(x) == 1; bool va = b.count(x) == 1; if (mr && va) cout << "MrMaxValu" << "\n"; else if (mr) cout << "MrMax" << "\n"; else if (va) cout << "MaxValu" << "\n"; else cout << -1 << "\n"; return 0; }