#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:100000000")
using namespace std;
int dp[100100][33];
int go(int a, int b, long long n) {
  if (dp[a][b] != -1) return dp[a][b];
  long long val = 1;
  for (int i = 0; i < b; i++) val *= (long long)a;
  if (val >= n) return dp[a][b] = 2;
  if (b > 30) return dp[a][b] = 0;
  if (b == 1 && a > 100000) {
    long long curval = a;
    long long ost = n - curval;
    if (ost % 2LL == 0) {
      return dp[a][b] = 2;
    } else {
      return dp[a][b] = 1;
    }
  }
  int var1 = go(a + 1, b, n);
  int var2 = go(a, b + 1, n);
  if (var1 == 1 || var2 == 1) return dp[a][b] = 2;
  if (var1 == 0 || var2 == 0) return dp[a][b] = 0;
  return dp[a][b] = 1;
}
int main() {
  memset(dp, -1, sizeof(dp));
  int a, b;
  long long n;
  scanf("%d %d %lld", &a, &b, &n);
  int res = go(a, b, n);
  if (res == 1)
    printf("Stas\n");
  else if (res == 2)
    printf("Masha\n");
  else
    printf("Missing\n");
  return 0;
}
