#include <bits/stdc++.h>
using namespace std;
long long n;
bool h[100100][40], u[100100][40];
bool big(long long a, long long b) {
  long long ans = 1;
  for (long long i = 0; i < b; ++i) {
    ans *= a;
    if (ans >= n) return 1;
  }
  return 0;
}
bool win(long long a, long long b) {
  if (b == 1 && a > 100100 - 10) return (n - a) % 2 == 0;
  if (u[a][b]) return h[a][b];
  u[a][b] = 1;
  if (big(a, b)) return h[a][b] = 1;
  if (!win(a + 1, b) || !win(a, b + 1)) return h[a][b] = 1;
  return h[a][b] = 0;
}
bool miss(long long a, long long b) {
  for (long long i = b; i < 40; ++i)
    if (!win(a + 1, i)) {
      if ((i - b) % 2 == 0)
        cout << "Masha";
      else
        cout << "Stas";
      return 0;
    }
  cout << "Missing";
  return 1;
}
int main() {
  long long a, b;
  cin >> a >> b >> n;
  if ((a > 1))
    if (win(a, b))
      cout << "Masha";
    else
      cout << "Stas";
  if (a == 1) miss(a, b);
  return 0;
}
