#include using namespace std; #define rep(i,n) for(int i=0; i<(n); ++i) using ll = long long; 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 flag1 = false; bool flag2 = false; rep(i,n){ if(a[i]==x) flag1 = true; } rep(i,m){ if(b[i]==x) flag2 = true; } if(flag1 && flag2){ cout << "MrMaxValu" << endl; }else if(flag1){ cout << "MrMax" << endl; }else if(flag2){ cout << "MaxValu" << endl; }else{ cout << -1 << endl; } }