#include using namespace std; #define rep(i,n) for(int i = 0; i < (n);i++) #define sz(x) int(x.size()) typedef long long ll; typedef pair P; int main(){ int x, n, m; cin >> x >> n >> m; vector a(n), b(m); rep(i,n) cin >> a[i]; rep(i,m) cin >> b[i]; bool ok1 = false, ok2 = false; for (int i = 0; i < n; i++) if (a[i] == x) ok1 = true; for (int j = 0; j < m; j++) if (b[j] == x) ok2 = true; if (ok1 & ok2) cout << "MrMaxValu" << endl; else if (ok1) cout << "MrMax" << endl; else if (ok2) cout << "MaxValu" << endl; else cout << -1 << endl; return 0; }