#include <bits/stdc++.h>
using namespace std;
int f[40400][40], n;
int dp(int a, int b) {
  if (f[a][b] != -1) return f[a][b];
  if (a == 1 && (1 << b) >= n) return 1;
  if (a * a >= n && b == 1) return 2 - 2 * ((n - a) & 1);
  if (pow(a, b) + 1e-6 >= n) return f[a][b] = 2;
  return f[a][b] = 2 - min(dp(a + 1, b), dp(a, b + 1));
}
int a, b;
int main() {
  cin >> a >> b >> n;
  memset(f, -1, sizeof(f));
  int ans = dp(a, b);
  if (ans == 0)
    cout << "Stas" << endl;
  else if (ans == 1)
    cout << "Missing" << endl;
  else
    cout << "Masha" << endl;
  return 0;
}
