Given a NxNxN grid. Harvey and Mike are playing a game. The rule of the game is simple. Each of them in their turn choses a cell and mark it with their initials. But the catch here is once a cell is marked they can't chose any of the adjacent(sharing a common face not the just the edge) cell to it. Since Harvey is senior he goes first. Both of them play optimally. The player with no move remaining loses the game. Find out who wins.
Example 1:
Input: N = 2
Output: Mike
Explaination: 2*2*2 grid they have 8 blocks, 
if Harvey marks any of the cell the then Mark 
has only three options left, and once Mike 
chooses any one of the three, then Harvey has
no other option so Mike wins.
 
Example 2:
Input: N = 1
Output: Harvey
Explaination: There is only one cell which 
gets filled when Harvey uses his first turn. 
So Mike has no possible turn and Harvey wins.
 
Your Task:
You do not need to read input or print anything. Your task is to complete the function winner() which takes the value N as input parameter and returns the name of the winner. ie either "Harvey" or "Mike".
Expected Time Complexity: O(1)
Expected Auxiliary Space: O(1)
Constraints:
1 ≤ N ≤ 10^{18}

Source: geeksforgeeks | Difficulty: EASY
Tags: Game theory

Starter code: #User function Template for python3



class Solution:

    def winner(self, N):

        # code here

Solutions:
class Solution:

	def winner(self, N):
		k = N * N * N
		if k % 2 == 0:
			return 'Mike'
		return 'Harvey'


class Solution:

	def winner(self, N):
		a = N * N * N
		if a % 2 == 0:
			return 'Mike'
		else:
			return 'Harvey'


class Solution:

	def winner(self, N):
		a = 1
		b = 'Mike'
		c = 'Harvey'
		for i in range(3):
			a = a * N
			if a % 2 == 0:
				return b
			else:
				return c


class Solution:

	def winner(self, N):
		M = 'Mike'
		H = 'Harvey'
		if N % 2 == 0:
			return M
		else:
			return H


class Solution:

	def winner(self, N):
		R = 1
		A = 'Mike'
		B = 'Harvey'
		for i in range(3):
			R = R * N
		if R % 2 == 0:
			return A
		else:
			return B


class Solution:

	def winner(self, N):
		c = N * N * N
		if c % 2 == 0:
			return 'Mike'
		else:
			return 'Harvey'
if __name__ == '__main__':
	t = int(input())
	for _ in range(t):
		N = int(input())
		ob = Solution()
		print(ob.winner(N))