#include <bits/stdc++.h>
using namespace std;
const int maxn = 500007;
const int maxm = 40000007;
const int ooi = 1e9 + 7;
const long long ool = 1e18 + 7;
const int apsz = 26;
const long long mod = 998244353;
string s;
int ans[maxn];
int n;
int pre[apsz];
void init() {
  cin >> s;
  n = s.length();
  fill(pre, pre + apsz, n);
  for (int i = (n - 1); i >= (0); --i) {
    int x = s[i] - 'a';
    pre[x] = i;
  }
}
void solve() {
  for (int i = (0); i < (n); ++i) {
    int x = s[i] - 'a';
    int pos = n;
    for (int j = (0); j < (x); ++j) pos = min(pos, pre[j]);
    if (pos < i) ans[i] = 1;
  }
  for (int i = (0); i < (n); ++i) {
    if (ans[i])
      cout << "Ann\n";
    else
      cout << "Mike\n";
  }
}
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  init();
  solve();
  return 0;
}
