#include using namespace std; int main() { int X, N, M; cin >> X >> N >> M; vector A( N ); for( int i = 0; i < N; i++ ) { cin >> A[i]; } vector B( M ); for( int i = 0; i < M; i++ ) { cin >> B[i]; } int a = 0; for( int i = 0; i < N; i++ ) { if( A[i] == X ) a = 1; } int b = 0; for( int i = 0; i < M; i++ ) { if( B[i] == X ) b = 1; } if( a && b ) cout << "MrMaxValu" << endl; else if( a && b == 0 ) cout << "MrMax" << endl; else if( a == 0 && b ) cout << "MaxValu" << endl; else cout << -1 << endl; }