def lscan; gets.split.map(&:to_i); end x,n,m = lscan e = lscan.include? x f = lscan.include? x puts (e && f) ? 'MrMaxValu' : e ? 'MrMax' : f ? 'MaxValu' : '-1'