#include using namespace std; #define REP(i,n) for(int i=0; i<(int)(n); i++) int main() { ios_base::sync_with_stdio(0); cin.tie(0); int x, n, m; cin >> x >> n >> m; bool ok[2] = {}; int cnt[2] = {n, m}; REP (i, 2) { REP (j, cnt[i]) { int tmp; cin >> tmp; if (tmp == x) ok[i] = true; } } if (ok[0] && ok[1]) cout << "MrMaxValu" << endl; else if (ok[0]) cout << "MrMax" << endl; else if (ok[1]) cout << "MaxValu" << endl; else cout << -1 << endl; return 0; }