#include using namespace std; #pragma GCC optimize("Ofast") #define all(x) (x).begin(),(x).end() #define rep(i, n) for(int (i) = 0; i < (n); i++) #define REP(i, m, n) for(int (i) = (m); (i) < (n); (i)++) #define INF LLONG_MAX - 10 #define MOD 1000000007 #define fcout cout << fixed << setprecision(15) #define int long long #define yorn(f) puts((f)?"Yes":"No") #define YORN(f) puts((f)?"YES":"NO") typedef long long ll; typedef pair P; typedef priority_queue pque; int gcd(int a,int b){return b?gcd(b,a%b):a;}; int lcm(int a,int b){return a*b/gcd(a,b);}; int mod(int a,int b){return (a+b-1)/b;}; int month[12] = {31,28,31,30,31,30,31,31,30,31,30,31}; template void Fill(A(&array)[N],const T &val){std::fill((T*)array,(T*)(array+N),val);} templateinline bool chmax(T& a,T b){if(a < b){a=b;return true;}return false;}; templateinline bool chmin(T& a,T b){if(a > b){a=b;return true;}return false;}; signed main() { cin.tie(0); cout.tie(0); ios::sync_with_stdio(false); int x, n, m; cin >> x >> n >> m; bool f1 = 0, f2 = 0; rep(i, n) { int a; cin >> a; if(a == x) f1 = 1; } rep(i, m) { int a; cin >> a; if(a == x) f2 = 1; } if(f1 && f2) puts("MrMaxValu"); else if(f1) puts("MrMax"); else if(f2) puts("MaxValu"); else puts("-1"); return 0; }