#include #include #include #include #include #define all(x) x.begin(),x.end() #define pb push_back #define ll long long using namespace std; int main() { int x,n,m; bool f = 0; bool g = 0; cin >> x>>n>>m; vector a(n), b(m); for (int i = 0; i > a[i]; if (a[i] == x) f = 1; } for (int i = 0; i < m; i++) { cin >> b[i]; if (b[i] == x) g = 1; } if (f == 1 and g == 0) cout << "MrMax" << endl; else if (f == 0 and g == 1) cout << "MaxValu" << endl; else if (f == 1 and g == 1) cout << "MrMaxValu" << endl; else cout<< -1 << endl; return 0; }