Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
f='A#BC D EF G3453543'.find
try:
while 1:x,y,z=sorted(map(lambda x:f(x[0])+f(x[1:])+1,raw_input().split()));print'MMianjoorr '[f;print'MMianjoorrr'[f(`y-x`+`z-y`)/14:-1:2]
except:0
Python, 161
f='A#BC D EF G3453543'.find
try:
while 1:x,y,z=sorted(map(lambda x:f(x[0])+f(x[1:])+1,raw_input().split()));print'MMianjoorr '[f(`y-x`+`z-y`)/14:-1:2]
except:0
Python, 160
f='A#BC D EF G3453543'.find
try:
while 1:x,y,z=sorted(map(lambda x:f(x[0])+f(x[1:])+1,raw_input().split()));print'MMianjoorrr'[f(`y-x`+`z-y`)/14:-1:2]
except:0
f='A#BC D EF G3453543'.find
try:
while 1:x,y,z=sorted(map(lambda x:' A BC D EF G'.findf(x[0])+' #'.find+f(x[1:])+1,raw_input().split()));print'MMianjoorr '['3453543'.find'[f(`y-x`+`z-y`)/314:-1:2]
except:0
Python, 169
try:
while 1:x,y,z=sorted(map(lambda x:' A BC D EF G'.find(x[0])+' #'.find(x[1:]),raw_input().split()));print'MMianjoorr '['3453543'.find(`y-x`+`z-y`)/3:-1:2]
except:0
Python, 161
f='A#BC D EF G3453543'.find
try:
while 1:x,y,z=sorted(map(lambda x:f(x[0])+f(x[1:])+1,raw_input().split()));print'MMianjoorr '[f(`y-x`+`z-y`)/14:-1:2]
except:0
try:
while 1:a=sortedx,y,z=sorted(map(lambda x:' A BC D EF G'.find(x[0])+' #'.find(x[1:]),raw_input().split()));print'MMianjoorr '['3453543'.find(`a[1]`y-a[0]`+`a[2]x`+`z-a[1]`y`)/3:-1:2]
except:0
Python, 177
try:
while 1:a=sorted(map(lambda x:' A BC D EF G'.find(x[0])+' #'.find(x[1:]),raw_input().split()));print'MMianjoorr '['3453543'.find(`a[1]-a[0]`+`a[2]-a[1]`)/3:-1:2]
except:0
Python, 169
try:
while 1:x,y,z=sorted(map(lambda x:' A BC D EF G'.find(x[0])+' #'.find(x[1:]),raw_input().split()));print'MMianjoorr '['3453543'.find(`y-x`+`z-y`)/3:-1:2]
except:0