#include <bits/stdc++.h>
using namespace std;
vector<vector<int>> DP;
long long n;
long long poww(int a, int b) {
  long long p = 1;
  while (b--) {
    p *= a;
  }
  return p;
}
int calc(long long a, int b) {
  if (DP[a][b] != -1) return DP[a][b];
  if (b == 1 && a * a >= n) return DP[a][b] = ((n - a) % 2 == 1 ? 0 : 2);
  if (poww(a, b) >= n) {
    return DP[a][b] = 2;
  }
  if (a == 1 && poww(2, b) >= n) {
    return DP[a][b] = 1;
  }
  return DP[a][b] = max(2 - calc(a + 1, b), 2 - calc(a, b + 1));
}
int main() {
  long long a, b;
  cin >> a >> b >> n;
  if (a * a >= n) {
    cout << (((a * a) - n) % 2 == 1 ? "Stas" : "Masha") << "\n";
  } else {
    DP.assign(4e4, vector<int>(31, -1));
    long long ans = calc(a, b);
    if (ans == 2)
      cout << "Masha\n";
    else if (ans == 0)
      cout << "Stas\n";
    else
      cout << "Missing\n";
  }
  return 0;
}
