#include #include #include #include #include #include #include #include #include #include #include #define MOD (1000000007l) #define ll long long #define rep(i, n) for (ll i = 0; i < (n); i++) using namespace std; void solve() { ll X, N, M; cin >> X >> N >> M; ll state = 0; rep (i, N) { ll tmp; cin >> tmp; if (tmp == X) state += 1; } rep (i, M) { ll tmp; cin >> tmp; if (tmp == X) state += 2; } if (state == 0) cout << -1 << endl; else if (state == 1) cout << "MrMax" << endl; else if (state == 2) cout << "MaxValu" << endl; else if (state == 3) cout << "MrMaxValu" << endl; } int main(void) { cin.tie(0); ios::sync_with_stdio(false); cout.precision(12); cout << fixed; solve(); return 0; }