#include <bits/stdc++.h>
void Get(int &T) {
  char C;
  bool F = 0;
  for (; C = getchar(), C < '0' || C > '9';)
    if (C == '-') F = 1;
  for (T = C - '0'; C = getchar(), C >= '0' && C <= '9'; T = T * 10 + C - '0')
    ;
  F && (T = -T);
}
int Max[33005];
int F[33005][35];
int A, B, N, M;
void Init() {
  Get(A);
  Get(B);
  Get(N);
  N--;
  for (int i = 2; (i - 2) * (i - 2) <= N; i++) {
    Max[i] = logl(N) / logl(i);
    M = i;
  }
  Max[M + 1] = Max[M + 2] = 1;
  Max[1] = Max[2];
}
void Work() {
  F[M + 2][1] = (((N - M)) & 1);
  for (int i = M + 1; i >= 1; i--) {
    for (int j = 30; j >= 1; j--) {
      if (Max[i] < j)
        F[i][j] = 1;
      else
        F[i][j] = (F[i + 1][j] == 0) || (F[i][j + 1] == 0);
    }
  }
}
void Output() {
  if (A == 1 && B > Max[1]) {
    puts("Missing");
  } else if (B == 1 && A > M)
    puts(((A - N) & 1) ? "Masha" : "Stas");
  else {
    puts((F[A][B]) ? "Masha" : "Stas");
  }
}
int main() {
  Init();
  Work();
  Output();
  return 0;
}
