#include <bits/stdc++.h>
using namespace std;
int n, dp[35000][50];
bool mypow(int a, int b) {
  for (long long ans = 1, x = a; b; b >>= 1, x *= x)
    if (b & 1) {
      ans *= x;
      if (ans >= n) return 0;
    }
  return 1;
}
bool dfs(int a, int b) {
  if (dp[a][b] != -1) return dp[a][b];
  return dp[a][b] = (mypow(a + 1, b) && !dfs(a + 1, b)) ||
                    (mypow(a, b + 1) && !dfs(a, b + 1));
}
int main() {
  int a, b;
  cin >> a >> b >> n;
  memset(dp, -1, sizeof(dp));
  if (a == 1 && !mypow(2, b))
    cout << "Missing" << endl;
  else if (b == 1 && !mypow(a, 2))
    cout << ((n - a) & 1 ? "Stas" : "Masha") << endl;
  else
    cout << (dfs(a, b) ? "Masha" : "Stas") << endl;
  return 0;
}
