#include <bits/stdc++.h>
using namespace std;
const int N = 35000;
const int M = 31;
int a, b, k;
int f[N][M];
bool judge(int a, int b) {
  long long res = 1ll;
  for (int i = 0; i < b; i++) {
    res = res * a;
    if (res <= 0 || res >= k) return true;
  }
  return false;
}
int dfs(int x, int y) {
  if (f[x][y] != -1) return f[x][y];
  if (judge(x, y)) return f[x][y] = 1;
  int res = 0;
  res |= !dfs(x + 1, y);
  res |= !dfs(x, y + 1);
  return f[x][y] = res;
}
int A(int c) {
  if (judge(1, c)) return 0;
  int as = 0;
  for (; !judge(2, c); c++) {
    if (f[2][c] == 0) {
      if (as == 0)
        return 1;
      else
        return -1;
    }
    as = 1 - as;
  }
  return 0;
}
int B(int c) {
  int al = sqrt(k - 0.0000001), as = 0;
  while (c <= al) {
    if (f[c][2] == 0) return as == 0;
    c++;
    as = 1 - as;
  }
  as = (as + k - c - 1) % 2;
  return as;
}
int main() {
  memset(f, -1, sizeof(f));
  scanf("%d%d%d", &a, &b, &k);
  if (judge(a, b)) {
    printf("Masha\n");
    return 0;
  }
  for (int i = 2; i < N; i++)
    for (int j = 2; j < M; j++) f[i][j] = dfs(i, j);
  if (a != 1 && b != 1) {
    if (f[a][b])
      printf("Masha\n");
    else
      printf("Stas\n");
    return 0;
  }
  if (a == 1 && b == 1) {
    int x = A(b + 1), y = B(a + 1);
    if (x < 0 || y == 0)
      printf("Masha\n");
    else if (x == 0)
      printf("Missing\n");
    else
      printf("Stas\n");
  } else if (a == 1) {
    int x = A(b);
    if (x == 0)
      printf("Missing\n");
    else if (x == 1)
      printf("Masha\n");
    else
      printf("Stas\n");
  } else if (b == 1) {
    if (B(a))
      printf("Masha\n");
    else
      printf("Stas\n");
  }
  return 0;
}
