#include <bits/stdc++.h>
using namespace std;
int sg[100000][35];
long long n;
long long quick_mod(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans *= a;
    a *= a;
    b >>= 1;
  }
  return ans;
}
long long dfs(int a, int b) {
  if (sg[a][b] != -1) return sg[a][b];
  if (quick_mod(a, b) >= n) return 0;
  if (a == 1) {
    if (quick_mod(2, b) >= n) return sg[a][b] = 2;
    if (dfs(a + 1, b) == 1) return 0;
    if (dfs(a, b + 1) == 0) return 1;
    if (dfs(a, b + 1) == 2) return 2;
  }
  if (b == 1) {
    if (dfs(a, b + 1) == 1) return 0;
    return !dfs(a + 1, b);
  }
  if (dfs(a + 1, b) || dfs(a, b + 1)) return sg[a][b] = 0;
  return 1;
}
int main() {
  memset(sg, 0xff, sizeof(sg));
  int a, b;
  cin >> a >> b >> n;
  int ans = dfs(a, b);
  if (ans == 0)
    cout << "Masha" << endl;
  else if (ans == 1)
    cout << "Stas" << endl;
  else
    cout << "Missing" << endl;
}
