# n, m, x, y = 11,11,3,6
# lx = min(x,n-x+1)
# ly = min(y,m-x+1)
# if min(lx,ly) < 6:
#     print("Mavis wins")
# else:
#     print("Shivam wins")

    
testcase=int(input())
for i in range(testcase):
    n, m, x, y =map(int,input().split())
    lx = min(x,n-x+1)
    ly = min(y,m-x+1)
    if min(lx,ly) < 6:
        print("Mavis wins")
    else:
        print("Shivam wins")
    
e3b8495d0594c2fe6750ef75f3c748a2428da5fd
<mask token>

<mask token>
for i in range(testcase):
    n, m, x, y = map(int, input().split())
    lx = min(x, n - x + 1)
    ly = min(y, m - x + 1)
    if min(lx, ly) < 6:
        print('Mavis wins')
    else:
        print('Shivam wins')

testcase = int(input())
for i in range(testcase):
    n, m, x, y = map(int, input().split())
    lx = min(x, n - x + 1)
    ly = min(y, m - x + 1)
    if min(lx, ly) < 6:
        print('Mavis wins')
    else:
        print('Shivam wins')

# n, m, x, y = 11,11,3,6
# lx = min(x,n-x+1)
# ly = min(y,m-x+1)
# if min(lx,ly) < 6:
#     print("Mavis wins")
# else:
#     print("Shivam wins")

    
testcase=int(input())
for i in range(testcase):
    n, m, x, y =map(int,input().split())
    lx = min(x,n-x+1)
    ly = min(y,m-x+1)
    if min(lx,ly) < 6:
        print("Mavis wins")
    else:
        print("Shivam wins")
    