#include <bits/stdc++.h>
using namespace std;
const int N = 4e4 + 10, M = 32, INF = 1e9 + 10;
int a, b, n;
int dp[N][M];
long long mypw(long long a, int b) {
  double ans = pow(a, b);
  if (ans > INF) {
    return INF;
  }
  long long ret = 1;
  while (b--) ret = ret * a;
  return ret;
}
int check(int a, int b) {
  if (a < N && b < M && dp[a][b] != -1) return dp[a][b];
  if (a == 1 && mypw(a + 1, b) >= n) {
    return 2;
  }
  if (b == 1 && mypw(a, b + 1) >= n) {
    return !((n - a) & 1);
  }
  if (mypw(a, b) >= n) return dp[a][b] = 1;
  int a1 = check(a + 1, b);
  int a2 = check(a, b + 1);
  if (a1 == 0 || a2 == 0) return dp[a][b] = 1;
  if (a1 == 2 || a2 == 2) return dp[a][b] = 2;
  return dp[a][b] = 0;
}
int main() {
  scanf("%d%d%d", &a, &b, &n);
  memset(dp, -1, sizeof(dp));
  int t = check(a, b);
  if (t == 1)
    puts("Masha");
  else if (t == 0)
    puts("Stas");
  else
    puts("Missing");
  return 0;
}
