# coding: utf-8 name = input() n = int(input()) lst = input().split() print('MrMax' if name in lst else 'MaxValu')