#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007, dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0};
const double eps = 1e-8;
void read(int &k) {
  k = 0;
  char x = getchar();
  while (x < '0' || x > '9') x = getchar();
  while (x >= '0' && x <= '9') {
    k = k * 10 - 48 + x;
    x = getchar();
  }
}
int dp[32010][33], a, b, n;
int main() {
  cin >> a >> b >> n;
  dp[1][31] = 2;
  for (int i = 1; i <= 32000; i++) {
    long long tmp = 1;
    for (int j = 1; j <= 31; j++) {
      tmp *= i;
      if (tmp >= n) dp[i][j] = 1, tmp = n;
    }
  }
  for (int i = 31999; i; i--)
    for (int j = 30; j; j--)
      if (dp[i][j] == 0) dp[i][j] = 4 - max(dp[i + 1][j], dp[i][j + 1]);
  if (dp[a][b] == 1)
    puts("Masha");
  else if (dp[a][b] == 3)
    puts("Stas");
  else
    puts("Missing");
  return 0;
}
