#include <bits/stdc++.h>
using namespace std;
long long n;
bool Lose(long long x, long long y) {
  long long tmp = 1;
  for (int i = 0; i < y; ++i) {
    tmp *= x;
    if (tmp >= n) return true;
  }
  return false;
}
map<pair<long long, long long>, long long> mp;
long long dfs(long long x, long long y) {
  if (mp.find(pair<long long, long long>(x, y)) != mp.end()) {
    return mp[pair<long long, long long>(x, y)];
  }
  if (x == 1 && Lose(x + 1, y)) {
    return mp[pair<long long, long long>(x, y)] = -1;
  }
  if (y == 1 && Lose(x, y + 1)) {
    if ((n - x) & 1) return mp[pair<long long, long long>(x, y)] = 0;
    return mp[pair<long long, long long>(x, y)] = 1;
  }
  if (Lose(x, y)) return mp[pair<long long, long long>(x, y)] = 1;
  long long u = Lose(x + 1, y);
  long long v = Lose(x, y + 1);
  if (u && v) {
    return mp[pair<long long, long long>(x, y)] = 0;
  }
  if (!u) u = dfs(x + 1, y);
  if (!v) v = dfs(x, y + 1);
  if (u == 0 || v == 0) {
    return mp[pair<long long, long long>(x, y)] = 1;
  }
  if (u == -1 || v == -1) return mp[pair<long long, long long>(x, y)] = -1;
  return mp[pair<long long, long long>(x, y)] = 0;
}
int main() {
  long long a, b;
  while (cin >> a >> b >> n) {
    mp.clear();
    if (Lose(a + 1, b) && Lose(a, b + 1)) {
      cout << "Stas" << endl;
      continue;
    }
    if (b == 1 && Lose(a, b + 1)) {
      if ((n - a) & 1)
        cout << "Stas" << endl;
      else
        cout << "Masha" << endl;
      continue;
    }
    long long tmp = dfs(a, b);
    if (tmp < 0)
      cout << "Missing" << endl;
    else if (tmp)
      cout << "Masha" << endl;
    else
      cout << "Stas" << endl;
  }
}
