#include using namespace std; using ll = long long; using P = pair; using PL = pair; // Welcome to my source code! int main() { int x, n, m; cin >> x >> n >> m; int a[n], b[m]; for (int i = 0; i < n; i++) cin >> a[i]; for (int i = 0; i < m; i++) cin >> b[i]; sort(a, a+n); sort(b, b+m); bool flag_a = false, flag_b = false; if (x == *lower_bound(a, a+n, x)) flag_a = true; if (x == *lower_bound(b, b+m, x)) flag_b = true; if (flag_a && flag_b) cout << "MrMaxValu" << endl; else if (flag_a) cout << "MrMax" << endl; else if (flag_b) cout << "MaxValu" << endl; else cout << -1 << endl; }