Mike and Ann are sitting in the classroom. The lesson is boring, so they decided to play an interesting game. Fortunately, all they need to play this game is a string $s$ and a number $k$ ($0 \le k < |s|$).

At the beginning of the game, players are given a substring of $s$ with left border $l$ and right border $r$, both equal to $k$ (i.e. initially $l=r=k$). Then players start to make moves one by one, according to the following rules: A player chooses $l^{\prime}$ and $r^{\prime}$ so that $l^{\prime} \le l$, $r^{\prime} \ge r$ and $s[l^{\prime}, r^{\prime}]$ is lexicographically less than $s[l, r]$. Then the player changes $l$ and $r$ in this way: $l := l^{\prime}$, $r := r^{\prime}$. Ann moves first. The player, that can't make a move loses.

Recall that a substring $s[l, r]$ ($l \le r$) of a string $s$ is a continuous segment of letters from s that starts at position $l$ and ends at position $r$. For example, "ehn" is a substring ($s[3, 5]$) of "aaaehnsvz" and "ahz" is not.

Mike and Ann were playing so enthusiastically that they did not notice the teacher approached them. Surprisingly, the teacher didn't scold them, instead of that he said, that he can figure out the winner of the game before it starts, even if he knows only $s$ and $k$.

Unfortunately, Mike and Ann are not so keen in the game theory, so they ask you to write a program, that takes $s$ and determines the winner for all possible $k$.


-----Input-----

The first line of the input contains a single string $s$ ($1 \leq |s| \leq 5 \cdot 10^5$) consisting of lowercase English letters.


-----Output-----

Print $|s|$ lines.

In the line $i$ write the name of the winner (print Mike or Ann) in the game with string $s$ and $k = i$, if both play optimally


-----Examples-----
Input
abba

Output
Mike
Ann
Ann
Mike

Input
cba

Output
Mike
Mike
Mike

Difficulty: EASY

Solutions:
import atexit
import io
import sys
_I_B = sys.stdin.read().splitlines()
input = iter(_I_B).__next__
_O_B = io.StringIO()
sys.stdout = _O_B

@atexit.register
def write():
	sys.__stdout__.write(_O_B.getvalue())

def main():
	s = input()
	mn = s[0]
	for i in range(len(s)):
		mn = min(mn, s[i])
		if s[i] > mn:
			print('Ann')
		else:
			print('Mike')
main()


from sys import stdin, stdout
input = stdin.readline
print = stdout.write
k = True
for i in input().rstrip('\n'):
	if k:
		print('Mike\n')
		p = i
		k = False
		continue
	if i <= p:
		p = i
		print('Mike\n')
	else:
		print('Ann\n')


a = list(input())
arr = 'z'
for item in a:
	if arr < item:
		print('Ann')
	else:
		print('Mike')
	if item < arr:
		arr = item


s = input()
e = list(s)
n = len(s)
mi = e[0]
for i in range(n):
	if s[i] > mi:
		print('Ann')
	else:
		print('Mike')
	mi = min(s[i], mi)


s = input()
m = 124
for i in s:
	if ord(i) <= m:
		print('Mike')
		m = ord(i)
	else:
		print('Ann')


s = input()
n = len(s)
pp = [0] * 28
A = ord('a')
pp[27] = 1
for i in s:
	cod = ord(i) - A
	if pp[cod] == 0:
		print('Mike')
	else:
		print('Ann')
	if pp[cod + 1] == 0:
		j = cod + 1
		while pp[j] == 0:
			pp[j] = 1
			j += 1


s = input()
mn = s[0]
ans = ['Mike']
for c in s[1:]:
	if c > mn:
		ans.append('Ann')
	else:
		mn = c
		ans.append('Mike')
print(*ans, sep='\n')


s = input()
pref = [s[0]]
for i in range(1, len(s)):
	pref.append(min(pref[i - 1], s[i]))
for k in range(len(s)):
	if pref[k] >= s[k]:
		print('Mike')
	else:
		print('Ann')


s = input()
min_char = 'z'
for letter in s:
	if letter <= min_char:
		print('Mike')
	else:
		print('Ann')
	min_char = min(min_char, letter)


s = input()
current_min = s[0]
for i in range(0, len(s)):
	if s[i] > current_min:
		print('Ann')
	else:
		print('Mike')
		current_min = s[i]


s = input()
y = []
for i in s:
	y.append(i)
arr = [0] * len(s)
i = 1
mina = y[0]
while i < len(s):
	if y[i] <= mina:
		mina = y[i]
	else:
		arr[i] = -1
	i += 1
print('Mike')
for i in range(1, len(s)):
	if arr[i] == -1:
		print('Ann')
	else:
		print('Mike')


s = str(input())
mini = ord(s[0])
for i in range(len(s)):
	if ord(s[i]) > mini:
		print('Ann')
	else:
		print('Mike')
		mini = ord(s[i])


s = input()
mi = s[0]
for i in s:
	if mi >= i:
		mi = i
		print('Mike')
	else:
		print('Ann')


s = input()
i = 1
mi = s[0]
print('Mike')
for i in range(1, len(s)):
	if s[i] <= mi:
		print('Mike')
		mi = s[i]
	else:
		print('Ann')


string = input()
output = []
min_letter = string[0]
for c in string:
	output.append('Ann' if min_letter < c else 'Mike')
	if c < min_letter:
		min_letter = c
print('\n'.join(output))


s = list(input())
a = [0] * 27
for i in range(0, len(s)):
	temp = ord(s[i])
	if sum(a[:temp - 96]) > 0:
		print('Ann')
	else:
		print('Mike')
	a[temp - 96] += 1


from sys import stdin, stdout
s = stdin.readline()
n = len(s)
ch = s[0]
for i in range(n - 1):
	stdout.write('%s\n' % ('Ann' if ch < s[i] else 'Mike'))
	ch = min(ch, s[i])


s = input()
b = list(s)
for i in range(1, len(s)):
	b[i] = min(b[i - 1], s[i])
print('Mike')
for k in range(1, len(s)):
	if s[k] > b[k - 1]:
		print('Ann')
	else:
		print('Mike')


def fastio():
	import sys
	from io import StringIO
	from atexit import register
	global input
	sys.stdin = StringIO(sys.stdin.read())
	input = lambda : sys.stdin.readline().rstrip('\r\n')
	sys.stdout = StringIO()
	register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()
MOD = 10 ** 9 + 7
INF = 10 ** 20
I = lambda : list(map(int, input().split()))
from collections import defaultdict as dd
from math import gcd
s = input()
n = len(s)
a = ['z'] * n
for i in range(n):
	a[i] = min(s[i], a[i - 1])
	if a[i] < s[i]:
		print('Ann')
	else:
		print('Mike')


a = input()
a = list(a)
a_min = a[0]
for i in range(len(a)):
	if i == 0:
		print('Mike')
	else:
		(l, r) = (i, i)
		br = True
		if a_min < a[i]:
			print('Ann')
		else:
			a_min = a[i]
			print('Mike')


s = input().rstrip()
minimum = 'z'
for ch in s:
	if ch > minimum:
		print('Ann')
	else:
		print('Mike')
		minimum = ch


s = input()
minn = '{'
A = [0] * len(s)
for i in range(len(s)):
	minn = min(s[i], minn)
	if minn == s[i]:
		print('Mike')
	else:
		print('Ann')


s = input().rstrip()
s = [i for i in s]
n = len(s)
pos = [0] * n
mini = s[0]
print('Mike')
for i in range(1, n):
	mini = min(mini, s[i])
	if mini < s[i]:
		print('Ann')
	else:
		print('Mike')


s = input()
l = []
for i in s:
	l.append(ord(i) - 96)
min1 = 10000000
for i in range(len(s)):
	if i == 0:
		print('Mike')
		min1 = min(min1, l[i])
	else:
		if l[i] > min1:
			print('Ann')
		else:
			print('Mike')
		min1 = min(min1, l[i])


s = input()
print('Mike')
m = s[0]
for i in range(1, len(s)):
	m = min(m, s[i])
	if s[i] > m:
		print('Ann')
	else:
		print('Mike')


s = input()
chl = [0] * len(s)
M = 'Mike'
A = 'Ann'
print(M)
for i in range(len(s)):
	chl[i] = ord(s[i])
minc = chl[0]
for i in range(1, len(s)):
	if minc < chl[i]:
		print(A)
	else:
		print(M)
		minc = chl[i]


l = input()
mini = 1000000
for i in range(len(l)):
	if ord(l[i]) > mini:
		print('Ann')
	else:
		print('Mike')
	mini = min(mini, ord(l[i]))


string = input()
l1 = []
for i in string:
	l1.append(ord(i) - 96)
min_ = 27
for i in l1:
	if i <= min_:
		print('Mike')
		min_ = i
	else:
		print('Ann')


import sys, os, io
from sys import stdin
from math import log, gcd, ceil
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
import math
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(int(i))
			n = n / i
	if n > 2:
		l.append(n)
	return list(set(l))

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def countdig(n):
	c = 0
	while n > 0:
		n //= 10
		c += 1
	return c

def prefix_sum(arr):
	r = [0] * (len(arr) + 1)
	for (i, el) in enumerate(arr):
		r[i + 1] = r[i] + el
	return r

def divideCeil(n, x):
	if n % x == 0:
		return n // x
	return n // x + 1

def si():
	return input()

def ii():
	return int(input())

def li():
	return list(map(int, input().split()))

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
t = 1
for _ in range(t):
	s = input()
	s = list(s)
	c = 'abcdefghijklmnopqrstuvwxyz'
	c = list(c)
	Min = 1000000000000000
	for i in range(len(s)):
		if Min < ord(s[i]) - 97:
			print('Ann')
		else:
			print('Mike')
		Min = min(Min, ord(s[i]) - 97)


s = input()
n = len(s)
min_val = s[0]
print('Mike')
for i in range(1, n):
	if s[i] > min_val:
		print('Ann')
	else:
		min_val = s[i]
		print('Mike')


s = list(input().strip())
dp = [s[0]]
ls = len(s)
for i in range(1, ls):
	dp.append(min(dp[i - 1], s[i]))
print('Mike')
for i in range(1, ls):
	if dp[i - 1] < s[i]:
		print('Ann')
	else:
		print('Mike')


import math
import sys
import collections
import itertools

def getdict(n):
	d = {}
	if type(n) is list:
		for i in n:
			if i in d:
				d[i] += 1
			else:
				d[i] = 1
	else:
		for i in range(n):
			t = ii()
			if t in d:
				d[t] += 1
			else:
				d[t] = 1
	return d

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 1
	prime[0] = prime[1] = False
	r = [p for p in range(n + 1) if prime[p]]
	return r

def cdiv(n, k):
	return n // k + (n % k != 0)

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def prr(a, sep=' '):
	print(sep.join(map(str, a)))

def dd():
	return collections.defaultdict(int)
s = input()
d = [ord(i) - 96 for i in s]
t = collections.Counter(d)
r = []
for i in range(len(s) - 1, -1, -1):
	f = True
	for j in range(1, d[i]):
		if t[j] > 0:
			r.append('Ann')
			f = False
			break
	if f:
		r.append('Mike')
	t[d[i]] -= 1
[print(i) for i in r[::-1]]


import sys
input = sys.stdin.readline
s = input().strip()
MINORD = ord(s[0])
for i in range(len(s)):
	if ord(s[i]) > MINORD:
		print('Ann')
	else:
		print('Mike')
	MINORD = min(ord(s[i]), MINORD)


import math
from collections import deque, defaultdict
from sys import stdin, stdout
listin = lambda : list(map(int, input().split()))
mapin = lambda : map(int, input().split())
s = input()
z = defaultdict(int)
for i in s:
	z[i] += 1
	for j in 'abcdefghijklmnopqrstuvwxyz':
		if j == i:
			print('Mike')
			break
		elif z[j]:
			print('Ann')
			break


import sys
input = sys.stdin.readline

def printWinner(s):
	mi = float('inf')
	for (i, c) in enumerate(s):
		if mi >= ord(c):
			print('Mike')
		else:
			print('Ann')
		mi = min(mi, ord(c))

def main():
	printWinner(input().strip())
main()


string = input()
length = len(string)
mini = 10009
for i in range(length):
	x = ord(string[i]) % 97
	if x <= mini:
		print('Mike')
		mini = x
	else:
		print('Ann')


a = list(input())
m = a[0]
for i in range(len(a)):
	k = 0
	if a[i] > m:
		k = 1
	m = min(m, a[i])
	if k == 1:
		print('Ann')
	else:
		print('Mike')


string = input()
min_letter = [string[0]]
for c in string:
	min_letter.append(c if c < min_letter[-1] else min_letter[-1])
for (i, c) in enumerate(string, 1):
	if min_letter[i] < c:
		print('Ann')
	else:
		print('Mike')


import sys
s = sys.stdin.readline().strip()
n = len(s)
m = s[0]
print('Mike')
for j in range(1, n):
	if s[j] > m:
		print('Ann')
	else:
		print('Mike')
	m = min(s[j], m)


s = input()
n = len(s)
p = 257
for i in range(n):
	if ord(s[i]) > p:
		print('Ann')
	elif p >= ord(s[i]):
		print('Mike')
		p = ord(s[i])


a = input()
ff = {}
alphabet = 'abcdefghijklmnopqrstuvwxyz'
for i in alphabet:
	ff[i] = float('inf')
for i in range(len(a)):
	if ff[a[i]] > i:
		ff[a[i]] = i
for k in range(len(a)):
	Ann_Win = False
	for i in range(0, ord(a[k]) - ord('a')):
		if ff[alphabet[i]] < k:
			Ann_Win = True
	print('Ann' if Ann_Win else 'Mike')


a = input()
ls = ['Mike', 'Ann']
smallest = 'z'
for i in range(len(a)):
	if i == 0:
		print('Mike')
		if a[i] < smallest:
			smallest = a[i]
		continue
	character = a[i]
	j = i - 1
	if a[i] > smallest:
		print('Ann')
	else:
		print('Mike')
	if a[i] < smallest:
		smallest = a[i]


s = input()
m = ord(s[0])
for i in range(0, len(s)):
	a = ord(s[i])
	f = False
	if a > m:
		f = True
	else:
		m = a
	print('Mike' if not f else 'Ann')


dic = {}
st = 'abcdefghijklmnopqrstuvwxyz'
for i in range(26):
	dic[st[i]] = i + 1
i1 = input()
min_ind = dic[i1[0]]
print('Mike')
for i in range(1, len(i1)):
	if min_ind < dic[i1[i]]:
		print('Ann')
	elif min_ind >= dic[i1[i]]:
		print('Mike')
		min_ind = dic[i1[i]]


s = input()
ls = s[0]
for i in range(len(s)):
	if i == 0 or s[i] <= ls:
		print('Mike')
		ls = s[i]
	elif s[i] > ls:
		print('Ann')


S = input()
N = len(S)
L = [-1] * 26
R = ['Ann'] * N
ca = ord('a')
for i in range(N):
	c = ord(S[i]) - ca
	ok = 0
	for j in range(c):
		if L[j] == 1:
			ok = 1
			break
	if not ok:
		L[c] = 1
		R[i] = 'Mike'
print(*R, sep='\n')


s = input()
k = len(s)
m = s[0]
for i in range(k):
	v = 1
	if s[i] <= m:
		m = s[i]
	else:
		v = 0
	if v == 1:
		print('Mike')
	else:
		print('Ann')


s = input()
n = len(s)
mi = s[0]
ind = 0
p = [0] * n
for i in range(1, n):
	if s[i] < mi:
		mi = s[i]
		ind = i
	elif s[i] != mi:
		p[i] = 1
for i in range(n):
	if p[i]:
		print('Ann')
	else:
		print('Mike')


def main():
	m = -1
	for i in input():
		if m == -1:
			m = i
			print('Mike')
		elif i > m:
			print('Ann')
		else:
			m = i
			print('Mike')
main()


import math
s = input()
n = len(s)
mins = [''] * n
minchar = s[0]
mins[0] = s[0]
print('Mike')
for i in range(1, n):
	if minchar >= s[i]:
		mins[i] = s[i]
		minchar = s[i]
		print('Mike')
	else:
		mins[i] = minchar
		print('Ann')


s = input()
minord = ord(s[0])
for c in s:
	if ord(c) > minord:
		print('Ann')
	else:
		print('Mike')
	minord = min(ord(c), minord)


from sys import stdin
import math
string = list(stdin.readline().strip())
aux = [-1] * len(string)
aux[0] = string[0]
small = string[0]
for i in range(1, len(string)):
	if small > string[i]:
		aux[i] = string[i]
		small = string[i]
	else:
		aux[i] = small
for i in range(len(string)):
	if string[i] == 'a':
		print('Mike')
	elif aux[i] < string[i]:
		print('Ann')
	else:
		print('Mike')


def solve(s):
	curr = chr(ord('z') + 1)
	for i in range(len(s)):
		c = s[i]
		if c <= curr:
			curr = c
			print('Mike')
		else:
			print('Ann')
solve(input())


s = list(input())
mini = s[0]
print('Mike')
for i in range(1, len(s)):
	if mini < s[i]:
		print('Ann')
	else:
		print('Mike')
		mini = s[i]


string = input()
n = len(string)
answers = []
asciis = [ord(c) for c in string]
minimums = [500]
for (i, x) in enumerate(asciis):
	if x < minimums[-1]:
		minimums.append(x)
	else:
		minimums.append(minimums[-1])
minimums = minimums[1:]
for i in range(n):
	if minimums[i] < asciis[i]:
		answers.append(False)
	else:
		answers.append(True)
for a in answers:
	if a:
		print('Mike')
	else:
		print('Ann')


mod = 10 ** 9 + 7
from sys import stdin, stdout
import bisect
from bisect import bisect_left as bl
from bisect import bisect_right as br
import itertools
import collections
import math
import heapq
from random import randint as rn

def modinv(n, p):
	return pow(n, p - 2, p)

def ncr(n, r, p):
	t = fact[n] * (ifact[r] * ifact[n - r] % p) % p
	return t

def ain():
	return list(map(int, sin().split()))

def sin():
	return input()

def inin():
	return int(input())

def GCD(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def main():
	l = sin()
	a = [0] * 26
	for i in l:
		j = ord(i) - ord('a')
		a[j] = 1
		t = 0
		for k in range(j):
			if a[k] == 1:
				t = 1
				print('Ann')
				break
		if t == 0:
			print('Mike')
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.getvalue())
			(self.truncate(0), self.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			self.write = lambda s: self.buffer.write(s.encode('ascii'))
			self.read = lambda : self.buffer.read().decode('ascii')
			self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


s = input()
ans = ['Mike'] * len(s)
mn = s[0]
for i in range(1, len(s)):
	ans[i] = 'Ann' if mn < s[i] else 'Mike'
	mn = min(mn, s[i])
print('\n'.join(ans))


import math
import random
import sys
import collections

def In():
	return map(int, sys.stdin.readline().split())
input = sys.stdin.readline

def substrlesson():
	s = input().rstrip()
	minbefore = chr(123)
	for i in range(len(s)):
		minbefore = min(minbefore, s[i])
		if i and minbefore < s[i]:
			print('Ann')
		else:
			print('Mike')
substrlesson()


s = input()
n = len(s)
k = 1
print('Mike')
a1 = s[0]
while k < n:
	ans = 0
	a = s[k]
	if a1 < a:
		ans = 1
	a1 = min(a1, a)
	k = k + 1
	if ans == 0:
		print('Mike')
	else:
		print('Ann')


import sys
input = sys.stdin.readline
from collections import Counter
s = input().strip('\n')
c = Counter(s)
l = sorted(list(c))
ans = []
mi = [1] * len(s)
curr = s[0]
for i in range(1, len(s)):
	if curr < s[i]:
		mi[i] = 0
	curr = min(curr, s[i])
for i in range(len(s)):
	if i == 0 or mi[i]:
		ans.append('Mike')
	else:
		ans.append('Ann')
for i in ans:
	print(i)


given = input()
curr = 'z'
for ch in given:
	if ch > curr:
		print('Ann')
	else:
		print('Mike')
	curr = min(curr, ch)


inp = input()
m = inp[0]
print('Mike')
for i in inp[1:]:
	if m < i:
		print('Ann')
	else:
		print('Mike')
		m = i


cur = 'z'
for ch in input():
	print('Ann' if cur < ch else 'Mike')
	if cur > ch:
		cur = ch


a = input().strip()
x = a[0]
for i in range(len(a)):
	if x < a[i]:
		print('Ann')
	else:
		print('Mike')
		x = a[i]


s = input()
k = ord('z') + 1
for i in s:
	if ord(i) <= k:
		print('Mike')
	else:
		print('Ann')
	k = min(k, ord(i))


s = input()
c = min(s)
cc = max(s)
ch = s.index(c)
chh = s.index(cc)
print('Mike')
m = s[0]
for i in range(1, len(s)):
	if s[i] > m:
		print('Ann')
	elif s[i] <= m:
		m = s[i]
		print('Mike')


import sys
a = input()
print('Mike')
mc = a[0]
for i in range(1, len(a)):
	if a[i] > mc:
		print('Ann')
	else:
		mc = a[i]
		print('Mike')
sys.exit(0)


s = input()
n = len(s)
m = ord('z') + 1
for i in range(n):
	if ord(s[i]) <= m:
		print('Mike')
		m = ord(s[i])
	else:
		print('Ann')


s = list(map(ord, input()))
min_ = s[0]
print('Mike')
for i in range(1, len(s)):
	if s[i] <= min_:
		print('Mike')
		min_ = s[i]
	else:
		print('Ann')


s = input()
l = len(s)
mn = 999
for i in range(l):
	n = ord(s[i]) % 97
	if n <= mn:
		print('Mike')
		mn = n
	else:
		print('Ann')


s = input()
m = 200
for i in range(len(s)):
	if ord(s[i]) <= m:
		print('Mike')
	else:
		print('Ann')
	m = min(m, ord(s[i]))


string = input()
ar = []
for x in range(len(string)):
	ar.append(string[x])
min = ar[0]
for x in range(len(ar)):
	if x == 0:
		print('Mike')
	elif ar[x] <= min:
		min = ar[x]
		print('Mike')
	else:
		print('Ann')


s = input()
arr = []
chars = [0] * 26
for i in range(len(s)):
	chars[ord(s[i]) - 97] += 1
	arr.append(sum(chars[:ord(s[i]) - 97]))
for i in arr:
	if i:
		print('Ann')
	else:
		print('Mike')


def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
import math
s = si()
n = len(s)
m = ['_'] * n
m[0] = s[0]
for i in range(1, n):
	m[i] = min(m[i - 1], s[i])
for i in range(n):
	if m[i] < s[i]:
		print('Ann')
	else:
		print('Mike')


a = input()
a = list(a)
m = a[0]
for i in a:
	if m >= i:
		print('Mike')
		m = i
	else:
		print('Ann')


s = input()
was_min = False
cur_min = s[0]
print('Mike')
for i in range(1, len(s)):
	if s[i] > cur_min:
		was_min = True
		print('Ann')
	elif s[i] == cur_min:
		print('Mike')
	else:
		print('Mike')
	cur_min = min(cur_min, s[i])


inf = float('inf')
en = lambda x: list(enumerate(x))
ii = lambda : int(input())
r = lambda : map(int, input().split())
rr = lambda : list(r())
s = input()
z = 'z'
for i in s:
	z = min(z, i)
	print('Mike' if z == i else 'Ann')


from os import path
import sys
from math import ceil, floor, gcd, log, log2, factorial
from collections import defaultdict, Counter, deque
from itertools import permutations
maxx = float('inf')
I = lambda : int(sys.stdin.buffer.readline())
tup = lambda : map(int, sys.stdin.buffer.readline().split())
lint = lambda : [int(x) for x in sys.stdin.buffer.readline().split()]
S = lambda : sys.stdin.readline().replace('\n', '').strip()

def grid(r, c):
	return [lint() for i in range(r)]
stpr = lambda x: sys.stdout.write(f'{x}' + '\n')
star = lambda x: print(' '.join(map(str, x)))
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
s = S()
m = 'z'
for i in s:
	if i > m:
		print('Ann')
	else:
		print('Mike')
	m = min(m, i)


import math
t = input()
s = set()
for i in t:
	res = False
	for n in s:
		if ord(n) < ord(i):
			res = True
			break
	s.add(i)
	if res:
		print('Ann')
	else:
		print('Mike')


word = input()
n = len(word)
mini = 'z'
for i in range(n):
	winnerMike = True
	if i > 0 and mini < word[i]:
		winnerMike = False
	if word[i] < mini:
		mini = word[i]
	if winnerMike:
		print('Mike')
	else:
		print('Ann')


s = input()
n = len(s)
min_lex = s[0]
for i in range(n):
	if ord(s[i]) > ord(min_lex):
		print('Ann')
	else:
		min_lex = s[i]
		print('Mike')


s = input()
m = s[0]
for k in range(len(s)):
	if k == 0:
		print('Mike')
	elif s[k] <= m:
		m = s[k]
		print('Mike')
	else:
		print('Ann')


s = input()
mins = []
curmin = 'z'
for c in s:
	if c < curmin:
		curmin = c
	if c > curmin:
		print('Ann')
	else:
		print('Mike')


s = input()
res = ['Mike'] * len(s)
m = s[0]
for i in range(1, len(s)):
	if s[i] > m:
		res[i] = 'Ann'
	m = min(m, s[i])
print('\n'.join(res))


a = input()
print('Mike')
amin = a[0]
for i in range(1, len(a)):
	k = 0
	if amin < a[i]:
		k = 1
	else:
		amin = a[i]
	if k == 1:
		print('Ann')
	else:
		print('Mike')


S = input()
max_before = []
smallest_so_far = S[0]
print('Mike')
for s in S[1:]:
	if s > smallest_so_far:
		print('Ann')
	else:
		print('Mike')
	smallest_so_far = min(smallest_so_far, s)


A = input()
n = len(A)
m = A[0]
print('Mike')
for i in range(1, n):
	if m < A[i]:
		print('Ann')
	else:
		print('Mike')
	m = min(m, A[i])


str = input()
min = str[0]
print('Mike')
for i in range(1, len(str)):
	if str[i] > min:
		print('Ann')
	else:
		min = str[i]
		print('Mike')


s = input()
mini = chr(ord('z') + 1)
for i in range(len(s)):
	if ord(s[i]) <= ord(mini):
		mini = s[i]
		print('Mike')
	else:
		print('Ann')


a = input()
b = 'abcdefghijklmnopqrstuvwxyz'
c = 30
sz = []
mo = []
for x in range(len(a)):
	for y in range(len(b)):
		if a[x] == b[y]:
			sz.append(y)
for x in range(len(a)):
	if sz[x] < c:
		c = sz[x]
	mo.append(c)
for x in range(len(mo)):
	if mo[x] < sz[x]:
		print('Ann')
	else:
		print('Mike')


from sys import stdin
input = stdin.readline
s = input().rstrip('\n')
x = ''
p = s[0]
for i in s:
	if i <= p:
		p = i
		print('Mike')
	else:
		print('Ann')


s = input()
n = len(s)
minleft = [0] * n
minleft[0] = s[0]
for i in range(1, n):
	minleft[i] = min(minleft[i - 1], s[i])
for i in range(n):
	if minleft[i] < s[i]:
		print('Ann')
	else:
		print('Mike')


s = input()
x = 'z'
for c in s:
	if x < c:
		print('Ann')
	else:
		print('Mike')
		x = c


s = input()
mi = 'z'
for k in s:
	if k > mi:
		print('Ann')
	else:
		print('Mike')
	mi = min(k, mi)


a = input()
b = a[0]
for i in range(len(a)):
	if b < a[i]:
		print('Ann')
	else:
		b = a[i]
		print('Mike')


s = list(input())
mini = 'zz'
for j in range(len(s)):
	if mini < s[j]:
		print('Ann')
	else:
		mini = s[j]
		print('Mike')


s = input()
win1 = 'Ann'
win2 = 'Mike'
alth = 'abcdefghijklmnopqrstuvwxyz'
num = alth.find(s[0])
for i in s:
	num2 = alth.find(i)
	if num < num2:
		print(win1)
	else:
		print(win2)
	num = min(num, num2)


z = input()
p = '{'
for i in range(len(z)):
	if i == 0:
		p = z[0]
		print('Mike')
	else:
		if p < z[i]:
			print('Ann')
		else:
			print('Mike')
		p = min(p, z[i])


s = input()
le = len(s)
m = 97
for i in range(le):
	if i == 0:
		print('Mike')
		m = ord(s[0])
		continue
	else:
		m = min(m, ord(s[i]))
		if ord(s[i]) > m:
			print('Ann')
		else:
			print('Mike')


s = input()
n = len(s)
dp = [0] * 500002
dp[0] = s[0]
for i in range(1, n):
	dp[i] = min(dp[i - 1], s[i])
for i in range(n):
	if dp[i] < s[i]:
		print('Ann')
	else:
		print('Mike')


a = input()
n = len(a)
a = list(a)
print('Mike')
ind = []
for i in range(28):
	ind.append(0)
for i in range(n):
	k = ord(a[i]) - 96
	if ind[k] == 0:
		ind[k] = i + 1
for i in range(2, n + 1):
	k = ord(a[i - 1]) - 96
	flag = 0
	for j in range(1, k):
		if ind[j] < i and ind[j] > 0:
			flag = 1
			break
	if flag == 1:
		print('Ann')
	else:
		print('Mike')


from sys import stdout

def solve(s):
	ans = 'Mike\n'
	mn = ord(s[0])
	for i in range(1, len(s)):
		if mn < ord(s[i]):
			ans += 'Ann\n'
		else:
			ans += 'Mike\n'
		mn = min(mn, ord(s[i]))
	return ans
s = input()
ans = solve(s)
stdout.write(ans)


s = input()
m = s[0]
ans = [0]
for i in range(1, len(s)):
	if s[i] > m:
		ans.append(1)
	else:
		m = s[i]
		ans.append(0)
for i in range(0, len(ans)):
	if ans[i] == 1:
		print('Ann')
	else:
		print('Mike')


s = input()
mn = s[0]
for x in s:
	if x <= mn:
		print('Mike')
	else:
		print('Ann')
	mn = min(mn, x)


from sys import stdin
s = stdin.readline().rstrip('\n')
mn = 'z'
for sym in s:
	mn = min(sym, mn)
	if mn == sym:
		print('Mike')
	else:
		print('Ann')


inp = input()
print('Mike')
x = inp[0]
for k in range(1, len(inp)):
	x = min(inp[k], x)
	flag = 0
	if inp[k] != 'a' and x < inp[k]:
		flag = 1
	if flag:
		print('Ann')
	else:
		print('Mike')


def idx(c):
	return ord(c) - ord('a')
s = input()
dp = [0 for x in range(len(s))]
dic = [-1 for x in range(26)]
dp[0] = 0
dic[idx(s[0])] = 0
print('Mike')
for x in range(1, len(s)):
	f = 0
	for i in range(idx(s[x])):
		if dic[i] >= 0:
			f = 1
			break
	dic[idx(s[x])] = 0
	if f == 1:
		print('Ann')
	else:
		print('Mike')


s = input()
a = [10 ** 9] * 26
for i in range(len(s)):
	a[ord(s[i]) - ord('a')] = min(i, a[ord(s[i]) - ord('a')])
for i in range(len(s)):
	r = ord(s[i]) - ord('a')
	fl = 0
	for j in range(r):
		if a[j] < i:
			fl = 1
			break
	if fl:
		print('Ann')
	else:
		print('Mike')


s = str(input())
min_char = 'z'
for i in range(0, len(s)):
	if s[i] <= min_char:
		print('Mike')
		min_char = s[i]
	else:
		print('Ann')


s = [ord(i) - 97 for i in input()]
n = len(s)
a = s.copy()
a = [9999999] + a
for i in range(1, n + 1):
	a[i] = min(a[i], a[i - 1])
for i in range(n):
	if a[i] < s[i]:
		print('Ann')
	else:
		print('Mike')


from math import *
mas = [0] * 26
s = input()
for i in range(len(s)):
	v = 0
	for j in range(ord(s[i]) - ord('a')):
		if mas[j] != 0:
			v = 1
	mas[ord(s[i]) - ord('a')] += 1
	if v == 0:
		print('Mike')
	else:
		print('Ann')


w = input()
n = len(w)
best = ['z'] * n
for i in range(1, n):
	best[i] = min(best[i - 1], w[i - 1])
ans = ['' for i in range(n)]
for i in range(n):
	ans[i] = ['Mike', 'Ann'][best[i] < w[i]]
print('\n'.join(ans))


s = input()
min = s[0]
l = []
for i in s:
	if min < i:
		l.append('Ann')
	else:
		l.append('Mike')
		min = i
for i in l:
	print(i)


s = input()

def find_smallest(s):
	smallest = 0
	res = []
	for i in range(len(s)):
		if s[i] > s[smallest]:
			res.append('Ann')
		else:
			smallest = i
			res.append('Mike')
	return res
for x in find_smallest(s):
	print(x)


s = input()
l = len(s)
d = [s[0] for i in range(l)]
print('Mike')
for i in range(1, l):
	d[i] = min(d[i - 1], s[i])
	if d[i] < s[i]:
		print('Ann')
	else:
		print('Mike')


from collections import deque, Counter
import array
from itertools import combinations, permutations
from math import sqrt
import unittest

def read_int():
	return int(input().strip())

def read_int_array():
	return [int(i) for i in input().strip().split(' ')]
s = input().strip()
print('Mike')
min_ = s[0]
for i in range(1, len(s)):
	if min_ < s[i]:
		print('Ann')
	else:
		print('Mike')
	if s[i] < min_:
		min_ = s[i]


s = input()
n = len(s)
mn = s[0]
for i in s:
	mn = min(mn, i)
	if mn < i:
		print('Ann')
	else:
		print('Mike')


from __future__ import division, print_function
from sys import stdin, stdout
import itertools, os, sys, threading
from collections import deque, Counter, OrderedDict, defaultdict
import heapq
from fractions import Fraction
import math

def ii():
	return int(input())

def si():
	return str(input())

def mi():
	return map(int, input().split())

def li():
	return list(mi())

def fii():
	return int(stdin.readline())

def fsi():
	return str(stdin.readline())

def fmi():
	return map(int, stdin.readline().split())

def fli():
	return list(fmi())
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def getKey(item):
	return item[0]

def sort2(l):
	return sorted(l, key=getKey)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

def powerMod(x, y, p):
	res = 1
	x %= p
	while y > 0:
		if y & 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
graph = defaultdict(list)
visited = [0] * 1000000
col = [-1] * 1000000

def bfs(d, v):
	q = []
	q.append(v)
	visited[v] = 1
	while len(q) != 0:
		x = q[0]
		q.pop(0)
		for i in d[x]:
			if visited[i] != 1:
				visited[i] = 1
				q.append(i)
		print(x)
from collections import defaultdict

def make_graph(e):
	d = {}
	for i in range(e):
		(x, y, z) = mi()
		if x not in d:
			d[x] = [[z, y]]
		else:
			d[x].append([z, y])
		if y not in d:
			d[y] = [[z, x]]
		else:
			d[y].append([z, x])
	return d

def gr2(n):
	d = defaultdict(list)
	for i in range(n):
		(x, y) = mi()
		d[x].append(y)
	return d

def connected_components(graph):
	seen = set()

	def dfs(v):
		vs = set([v])
		component = []
		while vs:
			v = vs.pop()
			seen.add(v)
			vs |= set(graph[v]) - seen
			component.append(v)
		return component
	ans = []
	for v in graph:
		if v not in seen:
			d = dfs(v)
			ans.append(d)
	return ans

def primeFactors(n):
	s = set()
	while n % 2 == 0:
		s.add(2)
		n = n // 2
	for i in range(3, int(sqrt(n)) + 1, 2):
		while n % i == 0:
			s.add(i)
			n = n // i
	if n > 2:
		s.add(n)
	return s

def find_all(a_str, sub):
	start = 0
	while True:
		start = a_str.find(sub, start)
		if start == -1:
			return
		yield start
		start += len(sub)

def SieveOfEratosthenes(n, isPrime):
	isPrime[0] = isPrime[1] = False
	for i in range(2, n + 1):
		isPrime[i] = True
	p = 2
	while p * p <= n:
		if isPrime[p] == True:
			i = p * p
			while i <= n:
				isPrime[i] = False
				i += p
		p += 1
	return isPrime

def SieveOfEratosthene(n, isPrime):
	isPrime[0] = isPrime[1] = 1
	for i in range(2, n + 1):
		isPrime[i] = 0
	p = 2
	while p * p <= n:
		if isPrime[p] != 0:
			i = p * p
			print(isPrime)
			while i <= n:
				isPrime[i] = p
				i += p
		p += 1
	return isPrime
s = si()
out = []
l = [s[0]]
for i in range(1, len(s)):
	l.append(min(l[i - 1], s[i]))
for i in range(len(s)):
	if s[i] <= l[i]:
		print('Mike')
	else:
		print('Ann')


s = input()
d = [0 for i in range(26)]
a = list(s)
p = 0
for i in range(len(s)):
	if d[ord(a[i]) - ord('a')] == 0:
		d[ord(a[i]) - ord('a')] = 1
	if i == 0:
		print('Mike')
		continue
	else:
		flag = 0
		for i in range(ord(a[i]) - ord('a')):
			if d[i] != 0:
				print('Ann')
				flag = 1
				break
		if flag == 0:
			print('Mike')


s = input()
alph = 'abcdefghijklmnopqrstuvwxyz'
print('Mike')
mn = alph.find(s[0])
for i in range(1, len(s)):
	if alph.find(s[i]) > mn:
		print('Ann')
	else:
		mn = alph.find(s[i])
		print('Mike')


s = input()
arr = sorted(s)
small = arr[0]
index = set()
for i in range(len(s)):
	if s[i] == small:
		index.add(i)
j = s.index(small)
for i in range(j):
	if i == 0:
		print('Mike')
	elif s[i] == min(s[:i + 1]):
		print('Mike')
	else:
		print('Ann')
for i in range(j, len(s)):
	if i == 0:
		print('Mike')
	elif i in index:
		print('Mike')
	else:
		print('Ann')


s = input()
a = [ord(c) - ord('a') + 1 for c in s]
res = [0] * len(s)
mi = a[0]
print('Mike')
for i in range(1, len(s)):
	if a[i] > mi:
		print('Ann')
	else:
		mi = a[i]
		print('Mike')


def win(i):
	if i == 1:
		return 'Ann'
	else:
		return 'Mike'
s = input()
lm = ''
for i in range(len(s)):
	if i == 0 or s[i] <= lm:
		print('Mike')
		lm = s[i]
	else:
		print('Ann')


s = list(input())
n = len(s)
a = [0] * n
for i in range(1, n):
	if s[i] > s[i - 1]:
		a[i] = 1
		s[i] = s[i - 1]
	else:
		a[i] = 0
for i in range(0, n):
	if a[i] == 0:
		print('Mike')
	else:
		print('Ann')


s = str(input())
n = len(s)
a = 'abcdefghijklmnopqrstuvwxyz'
d = {'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6, 'g': 7, 'h': 8, 'i': 9, 'j': 10, 'k': 11, 'l': 12, 'm': 13, 'n': 14, 'o': 15, 'p': 16, 'q': 17, 'r': 18, 's': 19, 't': 20, 'u': 21, 'v': 22, 'w': 23, 'x': 24, 'y': 25, 'z': 26}
string = [0] * n
for i in range(n):
	string[i] = d[s[i]]
is_left_less = [False] * n
min_left_ind = [-1] * n
min_el_l = string[0]
min_el_ind = 0
min_el_m = string[n - 1]
for i in range(n):
	if string[i] < min_el_l:
		min_el_l = string[i]
		min_left_ind[i] = i
		min_el_ind = i
	elif i > 0:
		if string[i] > min_el_l:
			min_left_ind[i] = min_el_ind
		else:
			min_left_ind[i] = min_left_ind[i - 1]
	if string[i] > min_el_l:
		is_left_less[i] = True
for k in range(n):
	if n == 1:
		print('Mike')
		continue
	if is_left_less[k]:
		print('Ann')
		continue
	else:
		print('Mike')


s = str(input())
arr = [[False for i in range(26)] for i in range(len(s))]
for i in range(len(s)):
	for j in range(26):
		arr[i][j] = arr[max(0, i - 1)][j]
	arr[i][ord(s[i]) - 97] = True
cond = False
for i in range(len(s)):
	cond = False
	if i >= 1:
		for j in range(0, ord(s[i]) - 97):
			if arr[i][j] == True:
				cond = True
				break
	if cond:
		print('Ann')
	else:
		print('Mike')


a = list(map(lambda c: ord(c) - 97, input()))
cnt = [0] * 26
ans = [''] * len(a)
for (i, kc) in enumerate(a):
	for j in range(kc):
		if cnt[j]:
			ans[i] = 'Ann'
			break
	else:
		ans[i] = 'Mike'
	cnt[kc] = 1
print(*ans, sep='\n')


l = list(input())
print('Mike')
mini = l[0]
for t in range(1, len(l)):
	if mini < l[t]:
		print('Ann')
	else:
		print('Mike')
	mini = min(mini, l[t])


s = input()
ar = []
for i in s:
	ar.append(int(ord(i)))
m = ar[0]
print('Mike')
for i in range(1, len(s)):
	if m < ar[i]:
		print('Ann')
	else:
		m = ar[i]
		print('Mike')


s = input()
n = len(s)
print('Mike')
m = s[0]
i = 1
while i < n:
	print(('Mike', 'Ann')[s[i] > m])
	m = min(m, s[i])
	i += 1


s = input()
a = []
mi = 'z'
for i in s:
	if i < mi:
		a.append(i)
		mi = i
	else:
		a.append(mi)
for i in range(len(s)):
	if a[i] < s[i]:
		print('Ann')
	else:
		print('Mike')


from bisect import bisect_left as bl, bisect_right as br, insort
import sys
import heapq
from math import *
from collections import defaultdict as dd, deque

def data():
	return sys.stdin.readline().strip()

def mdata():
	return map(int, data().split())
mod = 998244353
s = data()
l = [0] * len(s)
l[0] = -1
m = s[0]
for i in range(1, len(s)):
	if s[i] <= m:
		m = s[i]
		l[i] = -1
for i in range(len(s)):
	if l[i] == -1:
		print('Mike')
	else:
		print('Ann')


m = 'z'
for c in input():
	print('MAinkne'[c > m::2])
	m = min(m, c)


string = input().strip()
n = len(string)
mini = 'z'
for i in range(n):
	if i == 0:
		print('Mike')
	elif i == n - 1:
		if mini < string[n - 1]:
			print('Ann')
		else:
			print('Mike')
	elif mini < string[i]:
		print('Ann')
	else:
		print('Mike')
	mini = min(mini, string[i])


a = input()
x = a[0]
out = []
for el in a:
	if x < el:
		out.append('Ann\n')
	else:
		out.append('Mike\n')
		x = el
print(''.join(out))


s = input()
sms = []
mic = 'z'
for i in s:
	if i < mic:
		sms.append(i)
		mic = i
	else:
		sms.append(mic)
for i in range(len(s)):
	if sms[i] < s[i]:
		print('Ann')
	else:
		print('Mike')


s = input()
minc = s[0]
for c in s:
	print('Ann' if minc < c else 'Mike')
	minc = min(c, minc)


import sys
input = sys.stdin.readline

def getInt():
	return int(input())

def getVars():
	return map(int, input().split())

def getList():
	return list(map(int, input().split()))

def getStr():
	return input().strip()

def addDictList(d, key, val):
	if key not in d:
		d[key] = []
	d[key].append(val)

def addDictInt(d, key, val):
	if key not in d:
		d[key] = 0
	d[key] = val

def addDictCount(d, key):
	if key not in d:
		d[key] = 0
	d[key] += 1

def addDictSum(d, key, val):
	if key not in d:
		d[key] = 0
	d[key] += val
s = getStr()
m = s[0]
print('Mike')
for i in range(1, len(s)):
	if s[i] > m:
		print('Ann')
	else:
		print('Mike')
	m = min(m, s[i])


s = list(map(ord, list(input())))
n = len(s)
d = s[0]
print('Mike')
for k in range(1, n):
	d = min([d, s[k]])
	if d < s[k]:
		print('Ann')
	else:
		print('Mike')


s = input()
alph = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
d = {}
for l in alph:
	try:
		d[l] = s.index(l)
	except Exception:
		d[l] = len(s)
m = len(s)
k = {}
for i in range(len(alph)):
	k[alph[i]] = m
	m = min(m, d[alph[i]])
for i in range(len(s)):
	if k[s[i]] < i:
		print('Ann')
	else:
		print('Mike')


import sys
s = sys.stdin.readline().strip()
n = len(s)
min_enc = s[0]
dp = ['Mike'] * n
for i in range(1, n):
	if s[i] > min_enc:
		dp[i] = 'Ann'
	else:
		min_enc = s[i]
for i in range(n):
	print(dp[i])


s = input()
small = ord(s[0])
for i in s:
	if ord(i) > small:
		print('Ann')
	else:
		print('Mike')
		small = ord(i)


s = input()
min_val = 9999
for c in s:
	if min_val < ord(c):
		print('Ann')
	else:
		print('Mike')
	min_val = min(min_val, ord(c))


import math

def query(node, start, end, l, r):
	if l <= start and r >= end:
		return tree[node]
	elif l > end or r < start:
		return 'z'
	else:
		mid = (start + end) // 2
		return min(query(2 * node + 1, start, mid, l, r), query(2 * node + 2, mid + 1, end, l, r))

def build(node, start, end):
	if start == end:
		tree[node] = A[start]
	else:
		mid = (start + end) // 2
		build(node * 2 + 1, start, mid)
		build(node * 2 + 2, mid + 1, end)
		tree[node] = min(tree[2 * node + 1], tree[2 * node + 2])
A = input()
N = len(A)
tree = [0] * (2 ** (int(math.log(N, 2)) + 2) - 1)
build(0, 0, N - 1)
for i in range(N):
	if N == 0:
		print('Mike')
	minLeft = query(0, 0, N - 1, 0, i - 1)
	if minLeft < A[i]:
		print('Ann')
	else:
		print('Mike')


from heapq import heappush, heappop
from collections import deque, defaultdict, Counter
import sys
import bisect
import string

def I():
	return int(input())

def MI():
	return map(int, input().split())

def LI():
	return [int(i) for i in input().split()]

def LI_():
	return [int(i) - 1 for i in input().split()]

def StoI():
	return [ord(i) - 97 for i in input()]
ans = ['Ann', 'Mike']
s = list(input())

def solve(x):
	n = len(x)
	x = [ord(i) - 97 for i in x]
	fmin = [100]
	for i in x:
		fmin.append(min(fmin[-1], i))
	for k in range(n):
		if x[k] > fmin[k]:
			print(ans[0])
		else:
			print(ans[1])
solve(s)


import sys
input = sys.stdin.readline
s = input()[:-1]
print('Mike')
m = s[0]
for i in range(1, len(s)):
	if m < s[i]:
		print('Ann')
	else:
		print('Mike')
	m = min(m, s[i])


[s] = input().strip().split()
(mike, ann) = ('Mike', 'Ann')
k = s.__len__()
lessthan = [False] * k
smallestLetter = s[0]
for i in range(1, k):
	if s[i] > smallestLetter:
		lessthan[i] = True
	elif s[i] < smallestLetter:
		smallestLetter = s[i]
for i in range(k):
	if lessthan[i]:
		print(ann)
	else:
		print(mike)


s = input()
minn = 'z'
n = len(s)
for i in range(n):
	if i == 0:
		print('Mike')
	elif minn < s[i]:
		print('Ann')
	else:
		print('Mike')
	minn = min(s[i], minn)


s = input()
pre = [0] * len(s)
mini = ord(s[0]) - 97
pre[0] = 1
for i in range(1, len(s)):
	if ord(s[i]) - 97 > mini:
		pre[i] = 0
	else:
		mini = ord(s[i]) - 97
		pre[i] = 1
for i in pre:
	if i == 1:
		print('Mike')
	else:
		print('Ann')


s = input()
smallest = s[0]
for i in range(0, len(s)):
	smallest = min(smallest, s[i])
	if smallest < s[i]:
		print('Ann')
	else:
		print('Mike')


word = input()
x = word[0]
for el in word:
	if x < el:
		print('Ann')
	else:
		print('Mike')
		x = el


import sys

def main():

	def input():
		return sys.stdin.readline()[:-1]
	s = input()
	A = [0 for k in range(len(s))]
	A[0] = ord(s[0])
	for k in range(1, len(s)):
		A[k] = min(A[k - 1], ord(s[k]))
	for k in range(len(s)):
		if ord(s[k]) > A[k]:
			print('Ann')
		else:
			print('Mike')
main()


s = input()
ascii = [3000]
res = ['Mike']
mn = ord(s[0])
print('Mike')
for i in range(1, len(s)):
	if ord(s[i]) > mn:
		print('Ann')
	else:
		mn = ord(s[i])
		print('Mike')


s = input()
print('Mike')
min = s[0]
for i in range(1, len(s)):
	p = 0
	if min < s[i]:
		print('Ann')
		p = 9
	else:
		min = s[i]
	if p == 0:
		print('Mike')


s = input()
smallest_char_till_now = 'z'
for char in s:
	if char <= smallest_char_till_now:
		print('Mike')
		smallest_char_till_now = char
	else:
		print('Ann')


s = input()
minimal = s[0]
ans = [1]
for i in s[1:]:
	if i <= minimal:
		minimal = i
		ans.append(1)
	else:
		ans.append(0)
for i in ans:
	if i == 0:
		print('Ann')
	else:
		print('Mike')


import sys
input = sys.stdin.readline
s = input()
n = len(s) - 1
for i in range(n):
	if i == 0:
		sys.stdout.write('Mike' + '\n')
		x = s[i]
		continue
	if x < s[i]:
		sys.stdout.write('Ann' + '\n')
		continue
	else:
		sys.stdout.write('Mike' + '\n')
	x = min(x, s[i])


import sys
readline = sys.stdin.readline
S = tuple(map(ord, readline().strip()))
N = len(S)
Ans = [0] * N
pre = S[0]
for i in range(1, N):
	if pre < S[i]:
		Ans[i] = 1
	pre = min(pre, S[i])
print(*['Ann' if a else 'Mike' for a in Ans], sep='\n')


(s, curr) = (input(), 'z')
for i in range(len(s)):
	print('Mike' if i == 0 or s[i] <= curr else 'Ann')
	curr = min(curr, s[i])


s = input()
mini = s[0]
print('Mike')
for k in range(1, len(s)):
	if s[k] <= mini:
		print('Mike')
		mini = s[k]
	else:
		print('Ann')


s = input()
mine = s[0]
for i in range(len(s)):
	if i == 0:
		print('Mike')
	elif mine >= s[i]:
		print('Mike')
		mine = s[i]
	else:
		print('Ann')


s = input().strip()
lowPrev = 'z'
good = [False for x in range(len(s))]
for k in range(len(s)):
	if s[k] > lowPrev:
		good[k] = True
	else:
		lowPrev = s[k]
for x in good:
	if x:
		print('Ann')
	else:
		print('Mike')


import sys
input = sys.stdin.readline
s = input().strip()
a = s[0]
for i in s:
	if i <= a:
		print('Mike')
	else:
		print('Ann')
	a = min(a, i)


def main():
	s = list(input())
	n = len(s)
	c = float('inf')
	for i in range(n):
		if ord(s[i]) > c:
			print('Ann')
		else:
			print('Mike')
			c = ord(s[i])
main()


import sys
input = sys.stdin.readline

def main():
	s = input().rstrip()
	ans = []
	mn = chr(ord('z') + 1)
	for c in s:
		if mn < c:
			ans.append('Ann')
		else:
			ans.append('Mike')
		mn = min(mn, c)
	print('\n'.join(ans))
main()


import sys, os
from io import BytesIO, IOBase
from math import floor, gcd, fabs, factorial, fmod, sqrt, inf, log
from collections import defaultdict as dd, deque
from heapq import merge, heapify, heappop, heappush, nsmallest
from bisect import bisect_left as bl, bisect_right as br, bisect
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(stdin, stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
mod = pow(10, 9) + 7
mod2 = 998244353

def inp():
	return stdin.readline().strip()

def iinp():
	return int(inp())

def out(var, end='\n'):
	stdout.write(str(var) + '\n')

def outa(*var, end='\n'):
	stdout.write(' '.join(map(str, var)) + end)

def lmp():
	return list(mp())

def mp():
	return map(int, inp().split())

def smp():
	return map(str, inp().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(m, val) for j in range(n)]

def remadd(x, y):
	return 1 if x % y else 0

def ceil(a, b):
	return (a + b - 1) // b
S1 = 'abcdefghijklmnopqrstuvwxyz'
S2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

def isprime(x):
	if x <= 1:
		return False
	if x in (2, 3):
		return True
	if x % 2 == 0:
		return False
	for i in range(3, int(sqrt(x)) + 1, 2):
		if x % i == 0:
			return False
	return True
s = inp()
n = len(s)
c = s[0]
out('Mike')
for i in range(1, n):
	out('Ann' if c < s[i] else 'Mike')
	c = min(c, s[i])


import math
from decimal import Decimal
import heapq

def na():
	n = int(input())
	b = [int(x) for x in input().split()]
	return (n, b)

def nab():
	n = int(input())
	b = [int(x) for x in input().split()]
	c = [int(x) for x in input().split()]
	return (n, b, c)

def dv():
	(n, m) = map(int, input().split())
	return (n, m)

def dva():
	(n, m) = map(int, input().split())
	a = [int(x) for x in input().split()]
	b = [int(x) for x in input().split()]
	return (n, m, b)

def eratosthenes(n):
	sieve = list(range(n + 1))
	for i in sieve:
		if i > 1:
			for j in range(i + i, len(sieve), i):
				sieve[j] = 0
	return sorted(set(sieve))

def lol(lst, k):
	k = k % len(lst)
	ret = [0] * len(lst)
	for i in range(len(lst)):
		if i + k < len(lst) and i + k >= 0:
			ret[i] = lst[i + k]
		if i + k >= len(lst):
			ret[i] = lst[i + k - len(lst)]
		if i + k < 0:
			ret[i] = lst[i + k + len(lst)]
	return ret

def nm():
	n = int(input())
	b = [int(x) for x in input().split()]
	m = int(input())
	c = [int(x) for x in input().split()]
	return (n, b, m, c)

def dvs():
	n = int(input())
	m = int(input())
	return (n, m)

def Factor(n):
	Ans = []
	d = 2
	while d * d <= n:
		if n % d == 0:
			Ans.append(d)
			n //= d
		else:
			d += 1
	if n > 1:
		Ans.append(n)
	return Ans
s = input()
a1 = 'Mike'
a2 = 'Ann'
if len(s) == 1:
	print(a1)
	exit()
print(a1)
tc = s[0]
pre = []
n = len(s)
for i in range(1, n):
	d = min(s[i], tc)
	pre.append(d)
	tc = d
for i in range(1, n):
	if pre[i - 1] < s[i]:
		print(a2)
	else:
		print(a1)


s = list(input())
n = len(s)
minn = ord(s[0])
print('Mike')
arr = []
for i in range(1, n):
	if minn < ord(s[i]):
		print('Ann')
	else:
		minn = ord(s[i])
		print('Mike')


s = input()
n = len(s)
letters = []
for k in range(n):
	got = 0
	l = r = k
	if s[k] not in letters:
		letters += s[k]
	letters.sort()
	if s[k] != letters[0]:
		print('Ann')
	else:
		print('Mike')


import sys
import math
MAXNUM = math.inf
MINNUM = -1 * math.inf
ASCIILOWER = 97
ASCIIUPPER = 65

def getInt():
	return int(sys.stdin.readline().rstrip())

def getInts():
	return map(int, sys.stdin.readline().rstrip().split(' '))

def getString():
	return sys.stdin.readline().rstrip()

def printOutput(ans):
	sys.stdout.write(ans)
	pass

def solve(s):
	isSmaller = 'z'
	for k in s:
		if k > isSmaller:
			printOutput('Ann\n')
		else:
			printOutput('Mike\n')
			isSmaller = k

def readinput():
	s = getString()
	solve(s)
readinput()


s = input()
m = chr(ord('z') + 1)
ans = []
f = 0
for i in s:
	if i > m:
		ans.append('Ann')
	else:
		ans.append('Mike')
	m = min(m, i)
print('\n'.join(ans))


mi = '{'
for i in input():
	if i <= mi:
		mi = i
		print('Mike')
	else:
		print('Ann')


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import *
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
import copy
import time
starttime = time.time()
mod = int(pow(10, 9) + 7)
mod2 = 998244353

def data():
	return sys.stdin.readline().strip()

def out(*var, end='\n'):
	sys.stdout.write(' '.join(map(str, var)) + end)

def L():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]
try:
	sys.stdin = open('input.txt', 'r')
except:
	pass
s = input()
A = [0 for j in range(len(s))]
B = [0 for i in range(26)]
n = len(s)
for i in range(n):
	B[ord(s[i]) - ord('a')] += 1
	cnt = 0
	for j in range(ord(s[i]) - ord('a')):
		cnt += B[j]
	A[i] = cnt
for i in range(n):
	if A[i] == 0:
		print('Mike')
	else:
		print('Ann')
endtime = time.time()


m = 'z'
for i in input():
	print(['Ann', 'Mike'][i <= m])
	m = min(m, i)


def main():
	s = input()
	n = len(s)
	prefixMin = 'z'
	ans = ['Mike'] * n
	for i in range(n):
		if s[i] > prefixMin:
			ans[i] = 'Ann'
		prefixMin = min(prefixMin, s[i])
	multiLineArrayPrint(ans)
	return
import sys
input = lambda : sys.stdin.readline().rstrip('\r\n')

def oneLineArrayPrint(arr):
	print(' '.join([str(x) for x in arr]))

def multiLineArrayPrint(arr):
	print('\n'.join([str(x) for x in arr]))

def multiLineArrayOfArraysPrint(arr):
	print('\n'.join([' '.join([str(x) for x in y]) for y in arr]))

def readIntArr():
	return [int(x) for x in input().split()]

def makeArr(defaultValFactory, dimensionArr):
	dv = defaultValFactory
	da = dimensionArr
	if len(da) == 1:
		return [dv() for _ in range(da[0])]
	else:
		return [makeArr(dv, da[1:]) for _ in range(da[0])]

def queryInteractive(i, j):
	print('? {} {}'.format(i, j))
	sys.stdout.flush()
	return int(input())

def answerInteractive(ans):
	print('! {}'.format(' '.join([str(x) for x in ans])))
	sys.stdout.flush()
inf = float('inf')
MOD = 10 ** 9 + 7
for _abc in range(1):
	main()


import sys, math, queue
MOD = 10 ** 9 + 7
sys.setrecursionlimit(1000000)
s = input()
mn = s[0]
print('Mike')
for i in range(1, len(s)):
	if s[i] <= mn:
		print('Mike')
	else:
		print('Ann')
	mn = min(mn, s[i])


a = input()
g = ord(a[0])
for i in a:
	if g < ord(i):
		print('Ann')
	else:
		print('Mike')
		g = ord(i)


a = input()
n = len(a)
min_ele = a[0]
for k in range(n):
	if k == 0:
		print('Mike')
	elif min_ele < a[k]:
		print('Ann')
	else:
		print('Mike')
	min_ele = min(min_ele, a[k])


def main():
	s = input()
	max_k = len(s)
	min_upto = []
	min_letter = 'z'
	for (i, letter) in enumerate(s):
		min_letter = min(min_letter, s[i])
		min_upto.append(min_letter)
	min_letter = min_upto[max_k - 1]
	for i in range(max_k):
		if s[i] == min_letter or i == 0:
			print('Mike')
		elif min_upto[i - 1] < s[i]:
			print('Ann')
		else:
			print('Mike')
main()


s = input()
chuj = [ord(s[i]) for i in range(len(s))]
n = len(chuj)
print('Mike')
mini = 100000
for i in range(1, n):
	mini = min(mini, chuj[i - 1])
	if mini < chuj[i]:
		print('Ann')
	else:
		print('Mike')


a = input()
start = a[0]
print('Mike')
for j in range(1, len(a)):
	if a[j] > start:
		print('Ann')
	else:
		start = a[j]
		print('Mike')


s = input()
min = ord(s[0])
print('Mike', end='\n')
for c in range(len(s) - 1):
	if ord(s[c + 1]) > min:
		print('Ann', end='\n')
	else:
		min = ord(s[c + 1])
		print('Mike', end='\n')


s = input()
sm = 26
for c in s:
	i = ord(c) - ord('a')
	if i > sm:
		print('Ann')
	else:
		print('Mike')
	sm = min(sm, i)


from sys import stdin, stdout
S = stdin.readline().strip()
min_element = S[0]
seg_tree = [False for i in range(len(S))]
for i in range(1, len(S)):
	if S[i] > min_element:
		seg_tree[i] = True
	else:
		min_element = S[i]
for i in seg_tree:
	print('Ann') if i else print('Mike')


a = input()
h = a[0]
for i in a:
	if h < i:
		print('Ann')
	else:
		print('Mike')
		if h > i:
			h = i


str1 = input()
l1 = []
l1.append(str1[0])
for i in range(1, len(str1)):
	if str1[i] >= l1[i - 1]:
		l1.append(l1[i - 1])
	else:
		l1.append(str1[i])
for i in range(len(str1)):
	if str1[i] == l1[i]:
		print('Mike')
	else:
		print('Ann')


S = input()
N = len(S)
acc = [S[0]]
for i in range(N):
	s = S[i]
	if s >= acc[-1]:
		acc.append(acc[-1])
	else:
		acc.append(s)
acc.pop(0)
ans = []
for i in range(N):
	if i == 0:
		ans.append('Mike')
	else:
		s = S[i]
		if acc[i - 1] < s:
			ans.append('Ann')
		else:
			ans.append('Mike')
for a in ans:
	print(a)


from sys import stdin, stdout
s = stdin.readline()
length = len(s) - 1
mini = s[0]
winner = []
for i in range(length):
	if s[i] > mini:
		winner.append('Ann')
	else:
		mini = min(mini, s[i])
		winner.append('Mike')
for win in winner:
	stdout.write(win + '\n')


import sys
input = sys.stdin.readline
S = input().rstrip()
tmp = 200
for s in S:
	if ord(s) > tmp:
		print('Ann')
	else:
		print('Mike')
	tmp = min(tmp, ord(s))


import heapq
str = input()
str = list(str)
n = len(str)
ans = ['Mike'] * n
lis = []
heapq.heapify(lis)
for i in range(1, n):
	heapq.heappush(lis, str[i - 1])
	x = heapq.heappop(lis)
	if x < str[i]:
		ans[i] = 'Ann'
	heapq.heappush(lis, x)
for i in ans:
	print(i)


s = input()
minimum = 100
for i in s:
	if minimum < ord(i) - ord('a'):
		print('Ann')
	else:
		print('Mike')
	minimum = min(minimum, ord(i) - ord('a'))


s = input()
n = len(s)
dp = [''] * n
dp[0] = s[0]
ans = ['Mike']
for i in range(1, n):
	if s[i] > dp[i - 1]:
		ans.append('Ann')
		dp[i] = dp[i - 1]
	else:
		ans.append('Mike')
		dp[i] = s[i]
print(*ans, sep='\n')


x = input()
x = list(x)
cnt = []
for i in range(0, 26):
	cnt.append(-1)
n = len(x)
for i in range(0, n):
	if cnt[ord(x[i]) - ord('a')] == -1:
		cnt[ord(x[i]) - ord('a')] = i
for i in range(0, n):
	ans = 'Mike'
	for j in range(0, 26):
		if j < ord(x[i]) - ord('a') and cnt[j] < i and (cnt[j] != -1):
			ans = 'Ann'
	print(ans)


word = input()
duplicate = []
minchar = word[0]
for x in word:
	if ord(minchar) < ord(x):
		print('Ann')
	else:
		print('Mike')
		minchar = x


s = input()
min_letter = 'z'
for k in range(len(s)):
	if min_letter < s[k]:
		print('Ann')
	else:
		print('Mike')
	min_letter = min(min_letter, s[k])


from bisect import *
from collections import *
from itertools import *
import functools
import sys
import math
from decimal import *
from copy import *
from heapq import *
getcontext().prec = 30
MAX = sys.maxsize
MAXN = 10 ** 6 + 1
MOD = 10 ** 9 + 7

def isprime(n):
	n = abs(int(n))
	if n < 2:
		return False
	if n == 2:
		return True
	if not n & 1:
		return False
	for x in range(3, int(n ** 0.5) + 1, 2):
		if n % x == 0:
			return False
	return True

def mhd(a, b):
	return abs(a[0] - b[0]) + abs(b[1] - a[1])

def charIN(x=' '):
	return sys.stdin.readline().strip().split(x)

def arrIN(x=' '):
	return list(map(int, sys.stdin.readline().strip().split(x)))

def eld(x, y):
	a = y[0] - x[0]
	b = x[1] - y[1]
	return (a * a + b * b) ** 0.5

def lgcd(a):
	g = a[0]
	for i in range(1, len(a)):
		g = math.gcd(g, a[i])
	return g

def ms(a):
	msf = -MAX
	meh = 0
	st = en = be = 0
	for i in range(len(a)):
		meh += a[i]
		if msf < meh:
			msf = meh
			st = be
			en = i
		if meh < 0:
			meh = 0
			be = i + 1
	return (msf, st, en)

def ncr(n, r):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % MOD
		den = den * (i + 1) % MOD
	return num * pow(den, MOD - 2, MOD) % MOD

def flush():
	return sys.stdout.flush()

def fac(n):
	ans = 1
	for i in range(1, n + 1):
		ans *= i
		ans %= MOD
	return ans
s = input()
n = len(s)
temp = [0] * n
mn = s[0]
for i in range(1, n):
	if s[i] <= mn:
		temp[i] = i
		mn = s[i]
	else:
		temp[i] = temp[i - 1]
for i in range(n):
	if temp[i] < i:
		print('Ann')
	else:
		print('Mike')


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def main():
	pass

def binary(n):
	return bin(n).replace('0b', '')

def decimal(s):
	return int(s, 2)

def pow2(n):
	p = 0
	while n > 1:
		n //= 2
		p += 1
	return p

def isPrime(n):
	if n == 1:
		return False
	else:
		root = int(n ** 0.5)
		root += 1
		for i in range(2, root):
			if n % i == 0:
				return False
		return True

def lts(l):
	s = ''.join(map(str, l))
	return s

def stl(s):
	l = list(s)
	return l

def sq(a, target, arr=[]):
	s = sum(arr)
	if s == target:
		return arr
	if s >= target:
		return
	for i in range(len(a)):
		n = a[i]
		remaining = a[i + 1:]
		ans = sq(remaining, target, arr + [n])
		if ans:
			return ans

def SieveOfEratosthenes(n):
	cnt = 0
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	for p in range(2, n + 1):
		if prime[p]:
			cnt += 1
	return cnt

def nCr(n, r):
	f = math.factorial
	return f(n) // f(r) // f(n - r)
mod = int(1000000000.0) + 7

def ssinp():
	return input()

def iinp():
	return int(input())

def nninp():
	return map(int, input().split())

def llinp():
	return list(map(int, input().split()))

def p(xyz):
	print(xyz)

def p2(a, b):
	print(a, b)
import math
s = stl(ssinp())
l = 219381
for i in range(len(s)):
	if l < ord(s[i]):
		print('Ann')
	else:
		print('Mike')
		l = min(l, ord(s[i]))


def main():
	s = input()
	n = len(s)
	letters = [False] * 26
	ans = []
	for i in range(n):
		curr = ord(s[i]) - ord('a')
		found = False
		for j in range(curr):
			if letters[j]:
				found = True
				break
		letters[curr] = True
		if found:
			ans.append('Ann')
		else:
			ans.append('Mike')
	for i in ans:
		print(i)
main()


def find_si(l, r, si, s):
	temp = l
	i = 0
	while s[i] >= si[0] and i < l:
		i += 1
	l = i
	if temp == l:
		return None
	return True
s = input()
si = ''
l = 0
r = 0
h = [s[0]]
if s[0] > h[0]:
	print('Ann')
else:
	print('Mike')
for i in range(1, len(s)):
	h.append(s[i])
	if s[i] > h[i - 1]:
		h[i] = h[i - 1]
	if s[i] > h[i]:
		print('Ann')
	else:
		print('Mike')


s = list(input())
mins = list()
curmin = 'zz'
for i in range(len(s)):
	mins.append(curmin)
	if s[i] < curmin:
		curmin = s[i]
for i in range(len(s)):
	if mins[i] < s[i]:
		print('Ann')
	else:
		print('Mike')


import sys
lines = sys.stdin.readlines()
st = lines[0].strip()
N = len(st)
minChar = st[0]
print('Mike')
for i in range(1, N):
	if st[i] <= minChar:
		print('Mike')
		minChar = st[i]
	else:
		print('Ann')


s = list(input())
n = len(s)
dp = ['Mike' for i in range(n)]
start = 0
print(dp[0])
for i in range(1, n):
	if s[i] > s[start]:
		dp[i] = 'Mike' if s[start] == 'Ann' else 'Ann'
	else:
		dp[i] = 'Mike'
		start = i
	print(dp[i])


import os
import sys
from io import BytesIO, IOBase

def solution(s):
	n = len(s)
	mi = min(s)
	before = [0] * n
	cur_min = s[0]
	for i in range(1, n):
		if s[i] > cur_min:
			before[i] = 1
		else:
			cur_min = s[i]
	for k in range(n):
		if s[k] == mi or k == 0:
			write('Mike')
		elif before[k]:
			write('Ann')
		else:
			write('Mike')

def main():
	solution(input())
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')

def write(*args, end='\n'):
	for x in args[:-1]:
		sys.stdout.write(str(x) + ' ')
	sys.stdout.write(str(args[-1]))
	sys.stdout.write(end)

def r_array():
	return [int(x) for x in input().split()]

def r_int():
	return int(input())
main()


import sys
for line in sys.stdin:
	lexfirst = '{'
	for c in line[:-1]:
		if lexfirst >= c:
			print('Mike')
			lexfirst = c
		else:
			print('Ann')
	quit()


s = input()
la = [ord(i) for i in s]
mini = la[0]
ans = ['Mike']
for i in la[1:]:
	if i > mini:
		ans.append('Ann')
	else:
		ans.append('Mike')
		mini = min(i, mini)
for i in ans:
	print(i)


import sys
input = sys.stdin.readline
t = 1
for _ in range(t):
	a = input().rstrip('\n')
	stack = []
	n = len(a)
	prev = [i for i in range(len(a))]
	for i in range(len(a) - 1, -1, -1):
		while stack and ord(a[stack[-1]]) > ord(a[i]):
			prev[stack.pop()] = i
		stack.append(i)
	for i in range(n):
		if prev[i] == i:
			print('Mike')
		else:
			print('Ann')


def ip():
	return int(input())

def sip():
	return input()

def mip():
	return map(int, input().split())

def lip():
	return list(map(int, input().split()))

def matip(n, m):
	lst = []
	for i in range(n):
		arr = lip()
		lst.append(arr)
	return lst
s = sip()
lst = []
val = 'z'
for item in s:
	if item < val:
		lst.append(item)
		val = item
	else:
		lst.append(val)
for i in range(len(s)):
	if lst[i] < s[i]:
		print('Ann')
	else:
		print('Mike')


a = input()
s = []
minn = ord(a[0]) - 97
print('Mike')
for el in a[1:]:
	n = ord(el) - 97
	if n > minn:
		print('Ann')
	else:
		minn = n
		print('Mike')


import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
ALPHA = 'abcdefghijklmnopqrstuvwxyz'
MOD = 1000000007

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
s = input()
key = 'z'
for i in s:
	if i > key:
		print('Ann')
	else:
		print('Mike')
		key = i


from collections import Counter as C, defaultdict as D, deque as Q
from operator import itemgetter as I
from itertools import product as P, permutations as PERMUT
from bisect import bisect_left as BL, bisect_right as BR, insort as INSORT
from heapq import heappush as HPUSH, heappop as HPOP
from math import floor as MF, ceil as MC, gcd as MG, factorial as F, sqrt as SQRT, inf as INFINITY, log as LOG
from sys import stdin, stdout
INPUT = stdin.readline
PRINT = stdout.write
L = list
M = map

def Player1():
	print('Mike')

def Player2():
	print('Ann')

def Yes():
	PRINT('Yes\n')

def No():
	PRINT('No\n')

def IsPrime(n):
	for i in range(2, MC(SQRT(n)) + 1):
		if n % i == 0:
			return False
	return True

def Factors(x):
	ans = []
	for i in range(1, MC(SQRT(x)) + 1):
		if x % i == 0:
			ans.append(i)
			if x % (x // i) == 0:
				ans.append(x // i)
	return ans

def CheckPath(source, destination, g):
	visited = [0] * 101
	q = Q()
	q.append(source)
	visited[source] = 1
	while q:
		node = q.popleft()
		if node == destination:
			return 1
		for v in g[node]:
			if not visited[v]:
				q.append(v)
				visited[v] = 1
	return 0

def Sieve(n):
	prime = [1] * (n + 1)
	p = 2
	while p * p <= n:
		if prime[p]:
			for i in range(p * p, n + 1, p):
				prime[i] = 0
		p += 1
	primes = []
	for p in range(2, n + 1):
		if prime[p]:
			primes.append(p)
	return primes

def Prefix(a, n):
	p = []
	for i in range(n):
		if i == 0:
			p.append(a[0])
		else:
			p.append(p[-1] + a[i])
	return p

def Suffix(a, n):
	s = [0] * n
	for i in range(n - 1, -1, -1):
		if i == n - 1:
			s[i] = a[i]
		else:
			s[i] = s[i + 1] + a[i]
	return s

def Spf(n):
	spf = [0 for i in range(n)]
	spf[1] = 1
	for i in range(2, n):
		spf[i] = i
	for i in range(4, n, 2):
		spf[i] = 2
	for i in range(3, MC(SQRT(n)) + 1):
		if spf[i] == i:
			for j in range(i * i, n, i):
				if spf[j] == j:
					spf[j] = i
	return spf

def DFS(g, s, visited, ans):
	visited[s] = 1
	for (u, c) in g[s]:
		if visited[u]:
			continue
		if c == ans[s]:
			if c == 1:
				ans[u] = 2
			else:
				ans[u] = 1
		else:
			ans[u] = c
		DFS(g, u, visited, ans)

def lcm(a, b):
	return a * b // MG(a, b)

def Kadane(numbers):
	max_so_far = -INFINITY
	max_ending_here = 0
	max_element = -INFINITY
	for i in range(len(numbers)):
		max_ending_here = max(max_ending_here + numbers[i], 0)
		max_so_far = max(max_ending_here, max_so_far)
		max_element = max(max_element, numbers[i])
	if max_so_far == 0:
		max_so_far = max_element
	return max_so_far

def subset(start, a, res, ans):
	res.append(ans)
	for i in range(start, 9):
		subset(i + 1, a, res, ans + [a[i]])

def Main():
	string = INPUT()
	n = len(string) - 1
	check = [-1] * n
	s = set()
	s.add(string[0])
	Player1()
	for i in range(1, n):
		for v in s:
			if v < string[i]:
				check[i] = 1
				break
		if check[i] != -1:
			Player2()
		else:
			Player1()
		s.add(string[i])
Main()


myList = [chr(s) for s in list(range(ord('a'), ord('z') + 1))]
a = input()
print('Mike')
minimum = myList.index(a[0])
for i in range(1, len(a)):
	if minimum < myList.index(a[i]):
		print('Ann')
	else:
		minimum = myList.index(a[i])
		print('Mike')


string = input()
answers = [0] * len(string)
a = 'Mike'
min_char = string[0]
for i in range(len(string)):
	if string[i] <= min_char:
		answers[i] = 'Mike'
		min_char = string[i]
	else:
		answers[i] = 'Ann'
for i in range(len(answers)):
	print(answers[i])


from collections import Counter
import string
import math
import sys
from fractions import Fraction

def array_int():
	return [int(i) for i in sys.stdin.readline().split()]

def vary(arrber_of_variables):
	if arrber_of_variables == 1:
		return int(sys.stdin.readline())
	if arrber_of_variables >= 2:
		return map(int, sys.stdin.readline().split())

def makedict(var):
	return dict(Counter(var))
testcases = 1
for _ in range(testcases):
	s = input()
	n = len(s)
	mx = 128229
	for i in range(n):
		st = ord(s[i])
		if st > mx:
			mx = min(st, mx)
			print('Ann')
		else:
			mx = min(st, mx)
			print('Mike')


s = input()
length = len(s)
cache = []
min = s[0]
for i in range(length):
	if s[i] < min:
		min = s[i]
	cache.append(min)
for i in range(length):
	if cache[i] != s[i]:
		print('Ann')
	else:
		print('Mike')


s = input()
t = 'abcdefghijklmnopqrstuvwxyz'
n = len(s)
w = [-1] * n
d = {}
ind = {}
for i in range(26):
	d[t[i]] = 0
	ind[t[i]] = i
for i in range(n):
	w[i] = d[s[i]]
	if d[s[i]] == 0:
		for i in range(ind[s[i]] + 1, 26):
			if d[t[i]]:
				break
			d[t[i]] = 1
for i in w:
	print('MAinkne'[i::2])


s = input()
n = len(s)
mini = -1
for i in range(n):
	if mini == -1:
		mini = s[i]
	else:
		mini = min(mini, s[i])
	if mini == -1 or mini == s[i]:
		print('Mike')
	else:
		print('Ann')


def gera_tabela_indexada():
	alfabeto = 'abcdefghijklmnopqrstuvwxyz'
	dicionario = {}
	for (index, letra) in enumerate(alfabeto):
		dicionario[letra] = index
	return dicionario

def consulta(letra, tabela, dicionario):
	if letra == 'a':
		return False
	index = dicionario[letra]
	for i in range(index):
		if tabela[i] > 0:
			return True
	return False
string = input()
dicionario = gera_tabela_indexada()
tabela = [0 for i in range(26)]
for letra in string:
	if consulta(letra, tabela, dicionario):
		print('Ann')
	else:
		print('Mike')
	index = dicionario[letra]
	tabela[index] += 1


s = input()
n = len(s)
sm = s[0]
l = [False for i in range(n)]
for i in range(1, n):
	if s[i] > sm:
		l[i] = True
	else:
		sm = s[i]
for i in range(n):
	if l[i]:
		print('Ann')
	else:
		print('Mike')


a = input()
l = []
mi = 999999999999999
for i in a:
	k = ord(i) - 97
	if k > mi:
		l.append('1')
	else:
		l.append('0')
		mi = k
for i in l:
	print(i.replace('1', 'Ann').replace('0', 'Mike'))


s = input()
m = 'z'
for i in s:
	if i > m:
		print('Ann')
	else:
		print('Mike')
	m = min(m, i)


a = input('')
n = len(a)
ans = [1] * n
m = a[0]
for i in range(n):
	c = a[i]
	if c > m:
		ans[i] = 0
	else:
		ans[i] = 1
		m = c
for h in ans:
	if h == 1:
		print('Mike')
	else:
		print('Ann')


s = input().strip()
n = len(s)
m = s[0]
print('Mike')
for j in range(1, n):
	if s[j] > m:
		print('Ann')
	else:
		print('Mike')
	m = min(s[j], m)


s = input()
n = len(s)
smallest = ord(s[0])
print('Mike')
for i in range(1, n):
	if smallest < ord(s[i]):
		print('Ann')
	else:
		print('Mike')
		smallest = ord(s[i])


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
vals = [ord(k) - 97 for k in input()]
minsofar = 28
for s in range(len(vals)):
	if vals[s] < minsofar:
		minsofar = vals[s]
	if vals[s] > minsofar:
		print('Ann')
	else:
		print('Mike')


from sys import *
from math import *
s = input()
m = ord(s[0])
for i in range(len(s)):
	if ord(s[i]) > m:
		print('Ann')
	else:
		print('Mike')
		m = ord(s[i])


s = input()
mn = 1000
for elem in s:
	if mn < ord(elem):
		print('Ann')
	else:
		print('Mike')
		mn = ord(elem)


s = input()
bestString = [''] * len(s)
bestString[0] = 0
print('Mike')
for i in range(1, len(s)):
	annWins = False
	if s[i] < s[bestString[i - 1]]:
		bestString[i] = i
	else:
		bestString[i] = bestString[i - 1]
	if s[bestString[i]] < s[i]:
		print('Ann')
	else:
		print('Mike')


from collections import defaultdict, deque
from heapq import heappush, heappop
import sys
import math
import bisect

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def I():
	return int(sys.stdin.readline())

def LS():
	return [list(x) for x in sys.stdin.readline().split()]

def S():
	res = list(sys.stdin.readline())
	if res[-1] == '\n':
		return res[:-1]
	return res

def IR(n):
	return [I() for i in range(n)]

def LIR(n):
	return [LI() for i in range(n)]

def SR(n):
	return [S() for i in range(n)]

def LSR(n):
	return [LS() for i in range(n)]
sys.setrecursionlimit(1000000)
mod = 1000000007

def A():
	n = I()
	s = S()
	d = defaultdict(lambda : 0)
	for i in s:
		d[i] += 1
	ans = [1] * d['n']
	d['o'] -= d['n']
	ans += [0] * d['o']
	print(*ans)
	return

def B():
	n = I()
	m = LIR(n)
	f = [0] * n
	for i in range(n):
		for j in range(n):
			if i == j:
				continue
			f[i] += math.log(m[i][j], 10)
	F = sum(f)
	p = F / (2 * (n - 1))
	a = [round(10 ** ((f[i] - p) / (n - 2))) for i in range(n)]
	print(*a)
	return

def C():
	s = S()
	n = len(s)
	g = [0] * n
	m = 26
	f = [set() for i in range(m)]
	f[ord(s[0]) - ord('a')].add(0)
	for i in range(1, n):
		lis = set()
		k = ord(s[i]) - ord('a')
		for j in range(k):
			lis |= f[j]
		for j in range(100):
			if j not in lis:
				g[i] = j
				break
		f[k].add(j)
	for i in g:
		if i == 0:
			print('Mike')
		else:
			print('Ann')
	return

def D():
	n = I()
	b = LI()
	l = [i & -i for i in b]
	d = defaultdict(lambda : 0)
	for i in l:
		d[i] += 1
	m = [0, 0]
	for (i, j) in d.items():
		if m[1] < j:
			m = [i, j]
	ans = []
	for i in range(n):
		if m[0] != l[i]:
			ans.append(b[i])
	print(len(ans))
	print(*ans)
	return

def E():

	def root(x):
		if par[x] == x:
			return x
		par[x] = root(par[x])
		return par[x]

	def unite(x, y):
		x = root(x)
		y = root(y)
		if rank[x] < rank[y]:
			par[x] = y
		else:
			par[y] = x
			if rank[x] == rank[y]:
				rank[x] += 1
	(n, m) = LI()
	w = LI()
	v = [[] for i in range(n)]
	f = [0] * n
	for i in range(m):
		(a, b) = LI()
		a -= 1
		b -= 1
		v[a].append(b)
		v[b].append(a)
		f[a] += 1
		f[b] += 1
	s = I()
	s -= 1
	par = [i for i in range(n)]
	rank = [0] * n
	bfs = [1] * n
	q = deque()
	for x in range(n):
		if bfs[x]:
			bfs[x] = 0
			q.append(x)
			while q:
				x_ = q.popleft()
				for y in v[x_]:
					if bfs[y] and f[y] > 1:
						bfs[y] = 0
						if root(x_) != root(y):
							unite(x_, y)
						q.append(y)
		print(bfs)
	print(par)
	return

def F():
	return

def G():
	return
C()


z = input()
p = '{'
for i in z:
	if p < i:
		print('Ann')
	else:
		print('Mike')
		p = i


s = input()
n = len(s)
letters = {}
for i in range(26):
	letters[chr(ord('a') + i)] = 0
leftsmaller = []
rightsmaller = []
for i in range(n):
	try:
		letters[s[i]] += 1
	except:
		letters[s[i]] = 1
	leftsmaller.append(0)
	for j in letters:
		if j < s[i]:
			leftsmaller[i] += letters[j]
		else:
			break
for i in range(n):
	if leftsmaller[i] == 0:
		print('Mike')
	else:
		print('Ann')


def gns():
	return list(map(int, input().split()))
s = input()
d = [None] * 26
for i in range(len(s)):
	j = i
	i = ord(s[i]) - ord('a')
	if d[i] == None:
		d[i] = j
for i in range(len(s)):
	c = ord(s[i]) - ord('a')
	f = False
	for j in range(c):
		if d[j] != None and d[j] < i:
			f = True
			break
	if f:
		print('Ann')
	else:
		print('Mike')


s = input()
prev = 'z'
for i in range(len(s)):
	if s[i] <= prev:
		print('Mike')
		prev = s[i]
	else:
		print('Ann')


import sys
input = sys.stdin.readline
s = input().strip()
f = s[0]
for x in s:
	if ord(x) > ord(f):
		print('Ann')
	else:
		print('Mike')
	if ord(x) < ord(f):
		f = x


s = str(input(''))
b = s[0::1]
for a in s:
	if a <= b:
		print('Mike')
		b = min(a, b)
	else:
		print('Ann')


s = input()
a = [-1] * len(s)
menor = 'z'
for (i, v) in enumerate(s):
	if menor < v:
		a[i] = 1
	else:
		menor = v
for k in range(len(s)):
	if k == 0:
		print('Mike')
	elif a[k] == 1:
		print('Ann')
	else:
		print('Mike')


s = input()
ans = [0 for i in range(len(s))]
mini = s[0]
for i in range(1, len(s)):
	if s[i] > mini:
		ans[i] = 1
	else:
		ans[i] = 0
	mini = min(mini, s[i])
for i in range(len(s)):
	if ans[i] == 0:
		print('Mike')
	else:
		print('Ann')


s = input().strip()
mm = ord('z')
for i in range(len(s)):
	if ord(s[i]) <= mm:
		print('Mike')
	else:
		print('Ann')
	mm = min(mm, ord(s[i]))


a = input()
check = 'z'
for i in a:
	if i > check:
		print('Ann')
	else:
		print('Mike')
	check = min(check, i)


import os.path
import sys
from math import *
from collections import defaultdict as dd, deque
from math import floor, gcd, fabs, factorial, fmod, sqrt, inf, log
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def inp():
	return sys.stdin.readline().strip()
s = inp()
n = len(s)
c = s[0]
print('Mike')
for i in range(1, n):
	print('Ann' if c < s[i] else 'Mike')
	c = min(c, s[i])


input = __import__('sys').stdin.readline
s = input().strip()
k = len(s)
l = [0] * 26
res = [False] * k
for i in range(k):
	x = ord(s[i]) - 97
	for j in range(0, x):
		if l[j]:
			res[i] = True
			break
	l[x] += 1
for i in res:
	print('Ann' if i else 'Mike')


s = input()
n = len(s)
min = 123
for (i, e) in enumerate(s):
	b_s = False
	if i == 0:
		min = 0
		print('Mike')
		continue
	if ord(e) > ord(s[min]):
		print('Ann')
		continue
	elif ord(e) <= ord(s[min]):
		min = i
		print('Mike')
		continue


def solve(s):
	ans = [False]
	mn = ord(s[0])
	for i in range(1, len(s)):
		if mn < ord(s[i]):
			ans.append(True)
		else:
			ans.append(False)
		mn = min(mn, ord(s[i]))
	return ans
s = input()
ans = solve(s)
for i in ans:
	if i:
		print('Ann')
	else:
		print('Mike')


s = input()
n = len(s)
res = ['Mike']
dp = [-1 for i in range(n)]
dp[0] = ord(s[0]) - ord('a')
for i in range(1, n):
	val = ord(s[i]) - ord('a')
	dp[i] = min(dp[i - 1], val)
for i in range(1, n):
	val = ord(s[i]) - ord('a')
	if dp[i - 1] < val:
		res.append('Ann')
	else:
		res.append('Mike')
for i in range(n):
	print(res[i])


s = input()
a = ord(s[0])
for i in range(len(s)):
	if ord(s[i]) > a:
		print('Ann')
	else:
		a = ord(s[i])
		print('Mike')


input_string = input()
length = len(input_string)
seen_things = set()
for k in range(0, length):
	first_letter = input_string[k]
	if any((chr(n) in seen_things for n in range(ord('a'), ord(first_letter)))):
		print('Ann')
	else:
		print('Mike')
	seen_things.add(first_letter)


s = input()
a = [0] * len(s)
if len(s) == 1:
	print('Mike')
else:
	print('Mike')
	minfrom1 = '{'
	for i in range(1, len(s)):
		if s[i] > s[0]:
			print('Ann')
		elif s[i] > minfrom1:
			print('Ann')
		else:
			print('Mike')
		if s[i] < minfrom1:
			minfrom1 = s[i]


s = input()
sol = []
a = [0 for _ in range(len(s))]
a[0] = s[0]
for i in range(1, len(s)):
	t = s[i]
	a[i] = min(a[i - 1], s[i])
print('Mike')
for i in range(1, len(s)):
	if s[i] > a[i]:
		print('Ann')
	else:
		print('Mike')


import os

def f(s):
	result = [''] * len(s)
	min_char = s[0]
	result[0] = 'Mike'
	for i in range(1, len(s)):
		if min_char < s[i]:
			result[i] = 'Ann'
		else:
			result[i] = 'Mike'
			min_char = s[i]
	return ''.join((e + '\n' for e in result))
if os.environ.get('DEBUG', False):
	print(f"{f('abba')} = M A A M")
	print(f"{f('cba')} = M M M")
else:
	print(f(input()))


s = input()
n = len(s)
mn = s
for i in range(n):
	if mn < s[i]:
		print('Ann')
	else:
		mn = s[i]
		print('Mike')


N = 2 ** 31
s = str(input())
a = {chr(i + 97): N for i in range(-1, 26)}
d = a.copy()
for i in range(len(s)):
	a[s[i]] = min(a[s[i]], i + 1)
for i in range(0, 26):
	d[chr(i + 97)] = min(d[chr(i - 1 + 97)], a[chr(i - 1 + 97)])
for i in range(len(s)):
	if d[s[i]] < i + 1:
		print('Ann')
	else:
		print('Mike')


import math
from sys import *
from collections import defaultdict
import os, sys
from io import IOBase, BytesIO
M = 10 ** 9 + 7

def pow(a, b):
	res = 1
	while b > 0:
		if b & 1:
			res *= a
		a *= a
		b >>= 1
	return res

def powmod(a, b, m):
	res = 1
	while b > 0:
		if b & 1:
			res = res * a % m
		a *= a
		b >>= 1
	return res

def inv(a, m):
	return powmod(a, m - 2, m)

def factor(n):
	potentional_p = 3
	itog_list = {}
	if n % 2 == 0:
		itog_list[2] = 0
	while n % 2 == 0:
		n = n // 2
		itog_list[2] += 1
	while n - 1:
		if potentional_p > n ** 0.5:
			if n in itog_list:
				itog_list[n] += 1
			else:
				itog_list[n] = 1
			return itog_list
		while n % potentional_p == 0:
			n = n // potentional_p
			if potentional_p in itog_list:
				itog_list[potentional_p] += 1
			else:
				itog_list[potentional_p] = 1
		potentional_p += 2
	return itog_list

def meth(x):
	return ord(x)

def rev(s):
	if s == 'Mike':
		return 'Ann'
	return 'Mike'

def main():
	s = input()
	n = len(s)
	cmin = 0
	farr = ['Mike']
	for i in range(1, n):
		if meth(s[i]) > meth(s[cmin]):
			farr.append(rev(farr[cmin]))
		else:
			cmin = i
			farr.append('Mike')
	for x in farr:
		print(x)
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.getvalue())
			(self.truncate(0), self.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()