#include <bits/stdc++.h>
using namespace std;
ifstream fin("input.txt");
ofstream fout("output.txt");
const long long mod = 1000000000 + 7;
const int maxn = 100000 + 10;
const int inf = 1000000000;
long long a, b, n, gm[50003][66];
string out[3] = {"Stas", "Missing", "Masha"};
int f(long long x, long long y) {
  if (gm[x][y] != -1) return gm[x][y];
  if (x == 1 && 1 << y >= n) return 1;
  if (y == 1 && x * x >= n) return n - x & 1 ? 0 : 2;
  if (pow(x, y) + 1e-6 > n) return gm[x][y] = 2;
  return gm[x][y] = 2 - min((f(x + 1, y)), (f(x, y + 1)));
}
int main() {
  memset(gm, -1, sizeof gm);
  cin >> a >> b >> n;
  cout << out[f(a, b)] << endl;
  return 0;
}
