#pragma GCC optimize("O3") #pragma GCC target("avx") #include #define rep(i ,n) for(int i=0;i<(int)(n);++i) #define repr(i ,n) for(int i=n;i>(int)(n);--i) #define rep1(i ,n) for(int i=1;i<=(int)(n);++i) #define ALL(a) a.begin(), a.end() #define SORT(a) sort(ALL(a)) #define bit_check(bit, i) ((bit>>(i)) & 1) #define PRINT(x) printf("%d\n",(x)); using namespace std; typedef long long int int64; typedef unsigned long long uint64; template using V = vector; using I = int; using VI = V; const int INF = 2e9; const int64 MOD = 1e9 + 7; template inline bool chmin(T& a, T b){if(a>b){a=b; return true;} return false;} template inline bool chmax(T& a, T b){if(a> x >> n >> m; int a[n],b[m]; rep(i , n) cin >> a[i]; rep(i , m) cin >> b[i]; int found[2]={0}; rep(i , n){ if(a[i] == x ) {found[0] = 1 ; break;} } rep(i , m){ if(b[i] == x ) {found[1] = 1 ; break;} } if(found[0]&&!found[1]) cout << "MrMax" << endl; else if(!found[0]&&found[1]) cout << "MaxValu" << endl; else if(found[0]&&found[1]) cout << "MrMaxValu" << endl; else if(!found[0]&&!found[1]) cout << -1 << endl; }