#include <bits/stdc++.h>
using namespace std;
long long int maxi;
map<pair<long long int, long long int>, long long int> dp;
long long int recur(long long int a, long long int b) {
  if (dp.find(make_pair(a, b)) != dp.end()) return dp[make_pair(a, b)];
  long long int sum = 1;
  for (long long int i = 0; i < ((long long int)b); i++) {
    sum *= a;
    if (maxi <= sum) return dp[make_pair(a, b)] = 1;
  }
  if (a == 1) {
    sum = 1;
    for (long long int i = 0; i < ((long long int)b); i++) {
      sum *= 2;
      if (maxi <= sum) return dp[make_pair(a, b)] = 0;
    }
  }
  if (b == 1 && maxi <= a * a)
    return dp[make_pair(a, b)] = ((maxi - a) % 2) ? -1 : 1;
  dp[make_pair(a, b)] = -1;
  dp[make_pair(a, b)] = max(dp[make_pair(a, b)], -recur(a + 1, b));
  dp[make_pair(a, b)] = max(dp[make_pair(a, b)], -recur(a, b + 1));
  return dp[make_pair(a, b)];
}
int main() {
  long long int a, b;
  cin >> a >> b >> maxi;
  long long int sum = 1;
  for (long long int i = 0; i < ((long long int)b); i++) {
    sum *= a;
    if (maxi <= sum) {
      cout << "Missing" << endl;
      return 0;
    }
  }
  if (recur(a, b) == 1) {
    cout << "Masha" << endl;
  } else if (recur(a, b) == 0) {
    cout << "Missing" << endl;
  } else {
    cout << "Stas" << endl;
  }
}
