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