#include <bits/stdc++.h>
using namespace std;
template <typename A, typename B>
string to_string(pair<A, B> p);
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p);
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p);
string to_string(const string& s) { return '"' + s + '"'; }
string to_string(const char* s) { return to_string((string)s); }
string to_string(bool b) { return (b ? "true" : "false"); }
string to_string(vector<bool> v) {
  bool first = true;
  string res = "{";
  for (int i = 0; i < static_cast<int>(v.size()); i++) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(v[i]);
  }
  res += "}";
  return res;
}
template <size_t N>
string to_string(bitset<N> v) {
  string res = "";
  for (size_t i = 0; i < N; i++) {
    res += static_cast<char>('0' + v[i]);
  }
  return res;
}
template <typename A>
string to_string(A v) {
  bool first = true;
  string res = "{";
  for (const auto& x : v) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(x);
  }
  res += "}";
  return res;
}
template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p) {
  return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " +
         to_string(get<2>(p)) + ")";
}
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p) {
  return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " +
         to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + ")";
}
void debug_out() { cerr << "\033[33;0m" << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
template <typename T>
void debug_out(T a[], int n) {
  cerr << "{" << to_string(a[0]);
  for (int i = 1; i < n; ++i) cerr << ", " << to_string(a[i]);
  cerr << "}";
  debug_out();
}
using LL = long long;
using PII = pair<int, int>;
mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
LL powmod(LL a, LL b, LL MOD) {
  LL ans = 1;
  while (b) {
    if (b & 1) ans = ans * a % MOD;
    b >>= 1;
    a = a * a % MOD;
  }
  return ans % MOD;
}
const int N = 100005, MOD = 1e9 + 7, INF = 1e9;
LL A, B, n;
void init() { cin >> A >> B >> n; }
int dfs(LL a, LL b, int p) {
  double t = pow(n, 1.0 / b);
  if (t <= a) return -1;
  if (pow(a, b + 1) >= n) {
    int dist = ceil(pow(n, 1.0 / b)) - a;
    if (dist % 2 == 0)
      return -1;
    else
      return 1;
  }
  if (p > 25) return 0;
  int ans1 = dfs(a + 1, b, p + 1);
  int ans2 = dfs(a, b + 1, p + 1);
  if (ans1 == 1 || ans2 == 1)
    return -1;
  else if (ans1 == -1 and ans2 == -1)
    return 1;
  else
    return 0;
}
void work() {
  if (pow(n, 1.0 / B) <= A || pow(A, B) >= n) {
    puts("Stas");
    return;
  }
  if (pow(A, B + 1) >= n) {
    int dist = ceil(pow(n, 1.0 / B)) - A;
    if (dist % 2 == 0)
      puts("Masha");
    else
      puts("Stas");
    return;
  }
  int ans1 = dfs(A + 1, B, 0);
  int ans2 = dfs(A, B + 1, 0);
  int ans;
  if (ans1 == 1 || ans2 == 1)
    ans = 1;
  else if (ans1 == -1 and ans2 == -1)
    ans = -1;
  else
    ans = 0;
  if (ans == -1)
    puts("Stas");
  else if (ans == 1)
    puts("Masha");
  else
    puts("Missing");
}
int main() {
  time_t tic = clock();
  int T = 1;
  while (T--) {
    init();
    work();
  }
  time_t toc = clock();
  cerr << "execute time = " << (toc - tic) / CLOCKS_PER_SEC << "ms\n";
  return 0;
}
