#include using namespace std; int main(){ int x, n, m; cin >> x >> n >> m; bool af, bf; af = bf = false; for(int i = 0;i < n;i++){ int t; cin >> t; if(t == x) af = true; } for(int i = 0;i < m;i++){ int t; cin >> t; if(t == x) bf = true; } if(af && bf){ cout << "MrMaxValu" << endl; }else if(af){ cout << "MrMax" << endl; }else if(bf){ cout << "MaxValu" << endl; }else{ cout << -1 << endl; } return 0; }