#include <bits/stdc++.h>
using namespace std;
long double powld(long double base, long double exp) {
  long double result = base;
  while (exp > 1) {
    result *= base;
    exp--;
  }
  return result;
}
vector<vector<int> > DP;
int juego(int a, int b) {
  if (DP[a][b] != -1) return DP[a][b];
  int opt1 = juego(a + 1, b);
  int opt2 = juego(a, b + 1);
  if (opt1 == 0 || opt2 == 0)
    return DP[a][b] = 1;
  else if (opt1 == 2 || opt2 == 2)
    return DP[a][b] = 2;
  return DP[a][b] = 0;
}
int main() {
  int a, b, n;
  scanf("%d %d %d", &a, &b, &n);
  int A = (int)ceil(sqrt(1e9)) + 1;
  int B = 31;
  DP = vector<vector<int> >(A, vector<int>(B, -1));
  for (int i = 1; i < (int)A; ++i)
    for (int j = 1; j < (int)B; ++j)
      if (powld(i, j) >= n) DP[i][j] = 1;
  for (int j = 1; j < (int)B; ++j)
    if (powld(2, j) >= n) DP[1][j] = 2;
  for (int i = 1; i < (int)A; ++i)
    if (i < n && powld(i, 2) >= n) {
      if ((n - i) % 2 == 0)
        DP[i][1] = 1;
      else
        DP[i][1] = 0;
    }
  int result = juego(a, b);
  if (result == 0) printf("Stas\n");
  if (result == 1) printf("Masha\n");
  if (result == 2) printf("Missing\n");
  return 0;
}
