#include <bits/stdc++.h>
using namespace std;
int a, b;
long long n;
map<pair<int, int>, bool> m;
bool dfs(int a, int b) {
  if (a == 1) {
    long long val = 1;
    for (int(i) = 0; (i) < (b); ++(i)) val *= (long long)2;
    if (val * (long long)2 >= n) return m[make_pair(a, b)] = true;
  }
  if (m.find(make_pair(a, b)) != m.end()) return m[make_pair(a, b)];
  long long val = 1;
  for (int(i) = 0; (i) < (b + 1); ++(i)) val *= (long long)a;
  long long val2 = 1;
  for (int(i) = 0; (i) < (b); ++(i)) val2 *= (long long)(a + 1);
  if (val >= n && val2 >= n)
    return m[make_pair(a, b)] = false;
  else if (val < n && !dfs(a, b + 1))
    return m[make_pair(a, b)] = true;
  else if (val2 < n && !dfs(a + 1, b))
    return m[make_pair(a, b)] = true;
  else
    return m[make_pair(a, b)] = false;
}
int main() {
  cin >> a >> b >> n;
  if (a == 1) {
    long long val = 1;
    for (int(i) = 0; (i) < (b); ++(i)) val *= (long long)2;
    if (val >= n)
      cout << "Missing\n";
    else if (dfs(a, b))
      cout << "Masha\n";
    else
      cout << "Stas\n";
  } else if (dfs(a, b))
    cout << "Masha\n";
  else
    cout << "Stas\n";
}
