#include #define rep(i,n) for(int i=0;i P; const ll INF = 1e18; const int MOD = 1000000007; int main(){ int x,n,m; cin >> x >> n >> m; bool a = false,b = false; rep(i,n){ int p; cin >> p; if(p==x) a = true; } rep(i,m){ int p; cin >> p; if(p==x) b = true; } if(a && b) cout << "MrMaxValu" << endl; else if(a) cout << "MrMax" << endl; else if(b) cout << "MaxValu" << endl; else cout << -1 << endl; return 0; }