#include <bits/stdc++.h>
using namespace std;
long long val[40010][32];
int dp[40010][32];
long long n;
int dfs(int a, int b) {
  if (val[a][b] >= n) return 1;
  if (a >= 40000) {
    if ((n - a) % 2 == 0)
      return 1;
    else
      return -1;
  }
  if (b >= 32) return 0;
  if (dp[a][b] != -2) return dp[a][b];
  if (dfs(a + 1, b) == -1 || dfs(a, b + 1) == -1)
    dp[a][b] = 1;
  else if (dfs(a + 1, b) == 0 || dfs(a, b + 1) == 0)
    dp[a][b] = 0;
  else
    dp[a][b] = -1;
  return dp[a][b];
}
int main() {
  int a, b;
  cin >> a >> b >> n;
  for (int i = 1; i < 40010; i++)
    for (int j = 1; j < 32; j++) {
      if (j == 1)
        val[i][j] = i;
      else
        val[i][j] = val[i][j - 1] * i;
      if (val[i][j] >= n) val[i][j] = n;
      dp[i][j] = -2;
    }
  long long now = 1;
  for (int i = 0; i < b; i++) now *= a;
  int flag = dfs(a, b);
  if (flag == 1)
    printf("Masha\n");
  else if (flag == 0)
    printf("Missing\n");
  else
    printf("Stas\n");
  return 0;
}
