#include #define rep(i,n) for(int i = 0; i < (n); i++) using namespace std; typedef long long ll; int main(){ cin.tie(0); ios::sync_with_stdio(0); int X,N,M; cin >> X >> N >> M; set A, B; int fa = 0, fb = 0; rep(i,N){ int a; cin >> a; fa |= a == X; } rep(i,M){ int b; cin >> b; fb |= b == X; } if(fa && fb) cout << "MrMaxValu"; else if(fa && !fb) cout << "MrMax"; else if(!fa && fb) cout << "MaxValu"; else cout << "-1"; cout << endl; }