#include using namespace std; using ll = long long; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int x, n, m; cin >> x >> n >> m; set a, b; bool fa = false; for (int i = 0; i < n; ++i) { int y; cin >> y; if (y == x) fa = true; } bool fb = false; for (int i = 0; i < m; ++i) { int y; cin >> y; if (y == x) fb = true; } if (fa && fb) cout << "MrMaxValu"; else if (fa) cout << "MrMax"; else if (fb) cout << "MaxValu"; else cout << -1; cout << endl; return 0; }