#include <bits/stdc++.h>
using namespace std;
long long exp(long long a, int p) {
  if (p == 0) return 1;
  long long ans = exp(a, p / 2);
  ans = ans * ans;
  if (p % 2) ans = ans * a;
  return ans;
}
long long tar;
map<pair<int, int>, int> dp;
int type(int box, int item) {
  pair<int, int> pr(box, item);
  if (dp.count(pr)) return dp[pr];
  long long ways = exp(box, item);
  if (ways >= tar) return dp[pr] = 1;
  if (box == 1 && item > 32) return dp[pr] = -1;
  if (item == 1 && box * box > tar) {
    int rem = tar - box;
    return dp[pr] = 1 - rem % 2;
  }
  int t1 = type(box + 1, item);
  int t2 = type(box, item + 1);
  if (t1 == 0 || t2 == 0) return dp[pr] = 1;
  if (t1 == -1 || t2 == -1) return dp[pr] = -1;
  return dp[pr] = 0;
}
int main() {
  int box, item;
  cin >> box >> item >> tar;
  int ans = type(box, item);
  if (ans == 1) cout << "Masha" << endl;
  if (ans == 0) cout << "Stas" << endl;
  if (ans == -1) cout << "Missing" << endl;
}
