#include using namespace std; #define ll long long #define rep(i, n) for (int i = 0; i < (n); i++) #define P pair int main() { int x, n, m; cin >> x >> n >> m; x--; vector v1(100005), v2(100005); rep(i,n) { int a; cin >> a; a--; v1[a] = true; } rep(i,m) { int a; cin >> a; a--; v2[a] = true; } if (v1[x] && v2[x]) { cout << "MrMaxValu" << endl; } else if (v1[x]) { cout << "MrMax" << endl; } else if (v2[x]) { cout << "MaxValu" << endl; } else { cout << -1 << endl; } }