#include <bits/stdc++.h>
using namespace std;
map<pair<int, int>, int> M;
int a, b, n, sv;
int chk(int a, int b, int c) {
  for (int i = 0, x = 1; i < b; i++) {
    if (x >= (c + a - 1) / a)
      return 1;
    else
      x *= a;
  }
  return 0;
}
int dfs(int a, int b, int n, int pl) {
  if (M.count(pair<int, int>(a, b))) return M[pair<int, int>(a, b)];
  int u = chk(a, b, n);
  if (u == 1)
    M[pair<int, int>(a, b)] = pl;
  else if (b == 1 && a * a >= n)
    M[pair<int, int>(a, b)] = pl ^ ((n - a) % 2);
  else if (a == 1 && chk(a + 1, b, n) == 1)
    M[pair<int, int>(a, b)] = pl + 2, sv = 1;
  else if (dfs(a + 1, b, n, pl ^ 1) == pl || dfs(a, b + 1, n, pl ^ 1) == pl)
    M[pair<int, int>(a, b)] = pl;
  else
    M[pair<int, int>(a, b)] = pl ^ 1;
  return M[pair<int, int>(a, b)];
}
int main() {
  scanf("%d%d%d", &a, &b, &n);
  int x = dfs(a, b, n, 0);
  if (sv == 1)
    printf("Missing");
  else
    printf(x == 0 ? "Masha" : "Stas");
  return 0;
}
