#include <bits/stdc++.h>
using namespace std;
const int inf = 1000 * 1000 * 1000;
const int MOD = 1000 * 1000 * 1000 + 7;
long long a, b, n;
vector<vector<int> > DP;
long long Pow(long long a, long long b) {
  if (b == 0) return 1;
  if (b == 1) return a;
  if (b & 1) return a * Pow(a * a, b / 2);
  return Pow(a * a, b / 2);
}
int f(long long a, long long b) {
  if (Pow(a, b) >= n) return 1;
  vector<int> u(3, 0);
  if (a >= 100000) {
    long long t = n - a;
    return !(t & 1);
  }
  if (DP[a][b] == -1) {
    u[f(a + 1, b)] = 1;
    u[f(a, b + 1)] = 1;
    int k = 0;
    for (; u[k]; ++k)
      ;
    DP[a][b] = (k > 0);
  }
  return DP[a][b];
}
int F(int a, int b, int tt) {
  if (a == 1 && b >= 30) return 2;
  if (a == 1) {
    if (Pow(2, b) >= n)
      return 2;
    else {
      int t = f(a + 1, b) ^ 1;
      if (t == 0)
        return F(a, b + 1, tt ^ 1);
      else
        return t == 2 ? 2 : t ^ tt;
    }
  }
  return f(a, b);
}
string RES[3] = {"Stas", "Masha", "Missing"};
int main() {
  DP.resize(100100, vector<int>(100, -1));
  scanf("%lld%lld%lld", &a, &b, &n);
  printf("%s", RES[F(a, b, 0)].c_str());
  return 0;
}
