#include <bits/stdc++.h>
using namespace std;
int dp[10050][35];
int n;
bool check(int a, int b) {
  long long int sum = 1;
  for (int i = 1; i <= b; i++) {
    sum *= a;
    if (sum >= n) return true;
  }
  return false;
}
int dfs(int a, int b) {
  if (dp[a][b] != -2) return dp[a][b];
  if (a == 1 && check(2, b)) return dp[a][b] = -1;
  if (b == 1 && check(a, 2)) {
    if ((n - a) % 2 == 0)
      return dp[a][b] = 1;
    else
      return dp[a][b] = 0;
  }
  if (check(a, b)) return dp[a][b] = 1;
  int u = dfs(a + 1, b), v = dfs(a, b + 1);
  if (u == 1 && v == 1) return dp[a][b] = 0;
  if (u == 0) v = dfs(a, b + 1);
  if (v == 0) u = dfs(a + 1, b);
  if (u == 0 || v == 0) return dp[a][b] = 1;
  if (u == -1 && v == -1) return dp[a][b] = -1;
}
int main() {
  int a, b;
  while (cin >> a >> b >> n) {
    for (int i = 0; i < 10050; i++) {
      for (int j = 0; j < 35; j++) {
        dp[i][j] = -2;
      }
    }
    if (check(a + 1, b) && check(a, b + 1)) {
      puts("Stas");
      continue;
    }
    if (b == 1 && check(a, 2)) {
      if ((n - a) % 2 == 0)
        puts("Masha");
      else
        puts("Stas");
      continue;
    }
    int res = dfs(a, b);
    if (res == -1)
      puts("Missing");
    else if (res == 0)
      puts("Stas");
    else
      puts("Masha");
  }
  return 0;
}
