#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 7;
int dp[N][40], a, b, n;
long long qpow(int a, int b) {
  long long ret = 1;
  for (int i = (0); i < (b); ++i) ret *= a;
  return ret;
}
int gao(int a, int b) {
  int &ret = dp[a][b];
  if (~ret)
    return ret;
  else
    ret = 0;
  if (qpow(a, b) >= n) return ret = 2;
  if (a <= b) {
    if (gao(a + 1, b) == 0) return ret = 2;
  } else {
    if (gao(a, b + 1) == 0) return ret = 2;
  }
  if (a <= b) {
    if (a == 1 && qpow(a + 1, b) >= n) return ret = 1;
    return ret = 2 - gao(a, b + 1);
  } else {
    if (b == 1 && qpow(a, b + 1) >= n) return ret = 2 * ((n - a) % 2 == 0);
    return ret = 2 - gao(a + 1, b);
  }
}
int main() {
  while (~scanf("%d%d%d", &a, &b, &n)) {
    memset(dp, -1, sizeof(dp));
    int ret = gao(a, b);
    puts(ret == 1 ? "Missing" : ret ? "Masha" : "Stas");
  }
  return 0;
}
