#include <bits/stdc++.h>
using namespace std;
int f[100010][32];
long long n;
int Dp(int a, int b) {
  if (f[a][b] > -1) return f[a][b];
  if (pow(a / 1.0, b / 1.0) + 1e-10 >= n) return f[a][b] = 1;
  if (b == 1 && a * a >= n) return f[a][b] = 1 - (n - a) % 2;
  int u = Dp(a + 1, b), v = Dp(a, b + 1);
  if (u * v > 0)
    f[a][b] = 0;
  else if ((u + v) == 1)
    f[a][b] = 2;
  else
    f[a][b] = 1;
  return f[a][b];
}
int main() {
  int a, b;
  for (int i = 0; i < 100010; i++)
    for (int j = 0; j < 32; j++) f[i][j] = -1;
  scanf("%d%d%d", &a, &b, &n);
  if (a == 1) {
    Dp(a + 1, b);
    bool miss = 1;
    int i;
    for (i = b; pow((a + 1) / 1.0, i / 1.0) < n; i++)
      if (f[2][i] == 0) {
        miss = 0;
        break;
      }
    if (miss)
      puts("Missing\n");
    else {
      f[1][i] = 1;
      f[1][b] = 1 - (i - b) % 2;
      puts(f[1][b] ? "Masha\n" : "Stas\n");
    }
  } else {
    if (Dp(a, b))
      puts("Masha\n");
    else
      puts("Stas\n");
  }
}
