#include <bits/stdc++.h>
using namespace std;
const int N = 2010;
const double eps = 1e-8;
map<pair<int, int>, int> dp;
int gao(int a, int b, int n) {
  if (pow(1.0 * a, 1.0 * b) + eps >= n) {
    return dp[make_pair(a, b)] = 1;
  }
  if (dp.count(make_pair(a, b)) == 0) {
    if (a == 1 && pow(2.0, b) + eps >= n)
      dp[make_pair(a, b)] = 0;
    else if (b == 1 && pow(a, 2.0) + eps >= n) {
      dp[make_pair(a, b)] = (n - a) % 2 ? -1 : 1;
    } else {
      dp[make_pair(a, b)] = max(-gao(a + 1, b, n), -gao(a, b + 1, n));
    }
  }
  return dp[make_pair(a, b)];
}
int main() {
  int a, b, n;
  while (cin >> a >> b >> n) {
    dp.clear();
    int ret = gao(a, b, n);
    if (ret == 0)
      cout << "Missing" << endl;
    else if (ret == 1)
      cout << "Masha" << endl;
    else
      cout << "Stas" << endl;
  }
  return 0;
}
