#include using namespace std; #define int long long #define rep(i, l, r) for (int i = (int)(l); i < (int)(r); i++) #define all(x) (x).begin(), (x).end() #define sz(x) ((int)x.size()) template bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template bool chmin(T &a, T b) { if (a > b) { a = b; return 1; } return 0; } /* */ using vi = vector; using vvi = vector; using P = pair; signed main() { int x, n, m; cin >> x >> n >> m; vi a(n), b(m); bool t = false, u = false; rep(i, 0, n) { cin >> a[i]; if (a[i] == x) t = true; } rep(i, 0, m) { cin >> b[i]; if (b[i] == x) u = true; } if(t and u) cout << "MrMaxValu" << endl; else if(t) cout << "MrMax" << endl; else if(u) cout << "MaxValu" << endl; else cout << -1 << endl; return 0; }