#include <bits/stdc++.h>
using namespace std;
map<pair<int, int>, int> dp;
int ia, ib, n;
inline int modpow(long long a, int b) {
  long long res = 1;
  while (b) {
    if (b & 1) res *= a;
    if (res >= n) return n;
    a = a * a;
    if (a >= n) a = n;
    b >>= 1;
  }
  return (int)res;
}
inline int solve(int a, int b) {
  if (modpow(a, b) >= n) return 1;
  pair<int, int> z = pair<int, int>(a, b);
  if (dp.find(z) != dp.end()) return dp[z];
  if (a == 1 && b >= ib + 100) return dp[z] = -1;
  int r;
  if (b == 1 && a >= ia + 100)
    r = ((n - a) & 1);
  else
    r = solve(a + 1, b);
  if (!r) return dp[z] = 1;
  r = solve(a, b + 1);
  if (r == -1) return dp[z] = -1;
  return dp[z] = r ^ 1;
}
int main() {
  int a, b;
  cin >> a >> b >> n;
  ia = a, ib = b;
  int res = solve(a, b);
  if (res == 1)
    cout << "Masha\n";
  else if (res == 0)
    cout << "Stas\n";
  else
    cout << "Missing\n";
  return 0;
}
