#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
template <typename T>
bool mmax(T &m, const T q) {
  if (m < q) {
    m = q;
    return true;
  } else
    return false;
}
template <typename T>
bool mmin(T &m, const T q) {
  if (m > q) {
    m = q;
    return true;
  } else
    return false;
}
void __print(int first) { cerr << first; }
void __print(long first) { cerr << first; }
void __print(unsigned first) { cerr << first; }
void __print(unsigned long first) { cerr << first; }
void __print(unsigned long long first) { cerr << first; }
void __print(float first) { cerr << first; }
void __print(double first) { cerr << first; }
void __print(long double first) { cerr << first; }
void __print(char first) { cerr << '\'' << first << '\''; }
void __print(const char *first) { cerr << '\"' << first << '\"'; }
void __print(const string &first) { cerr << '\"' << first << '\"'; }
void __print(bool first) { cerr << (first ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &first) {
  cerr << '{';
  __print(first.first);
  cerr << ',';
  __print(first.second);
  cerr << '}';
}
template <typename T>
void __print(const T &first) {
  int f = 0;
  cerr << '{';
  for (auto &i : first) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
std::mt19937 rng(
    (int)std::chrono::steady_clock::now().time_since_epoch().count());
const int N = 80008;
int MX;
int dp[80000][32];
int go(int a, int b) {
  if (b == 1 && a * a >= MX) {
    return (MX - a) % 2 == 0 ? 1 : 2;
  }
  if (a == 1 && b > 30) return 0;
  if (pow(a, b) + (1e-3) >= (double)MX) {
    return 1;
  }
  int &r = dp[a][b];
  if (r == -1) {
    int win = 0;
    int draw = 0;
    if (go(a + 1, b) == 2) win = 1;
    if (go(a + 1, b) == 0) draw = 1;
    if (go(a, b + 1) == 2) win = 1;
    if (go(a, b + 1) == 0) draw = 1;
    if (win)
      r = 1;
    else if (draw)
      r = 0;
    else
      r = 2;
  }
  return r;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(12);
  long long a, b;
  cin >> a >> b >> MX;
  memset(dp, -1, sizeof(dp));
  if (go(a, b) == 1) {
    cout << "Masha";
  } else if (go(a, b) == 2)
    cout << "Stas";
  else
    cout << "Missing";
  return 0;
}
