#include <bits/stdc++.h>
using namespace std;
bool **dyn;
long long a, b;
long long n;
bool isp(long long a1, long long b1) {
  long long ans = 1;
  for (long long i = 0; i < b1; i++) {
    ans *= a1;
    if (ans >= n) return true;
  }
  return false;
}
int main() {
  cin >> a >> b >> n;
  long long a1 = a, b1 = b;
  a = 500000;
  b = 63;
  dyn = new bool *[a + 2];
  for (long long i = 0; i <= a + 1; i++) {
    dyn[i] = new bool[b + 2];
  }
  long long *last = new long long[a + 1];
  for (long long i = 1; i <= a + 1; i++) {
    bool flag = false;
    for (long long j = 1; j <= b + 1; j++) {
      dyn[i][j] = 0;
      if (isp(i, j)) {
        if (!flag) {
          last[i] = j;
          flag = true;
        }
        dyn[i][j] = 1;
      }
    }
  }
  for (long long i = a; i >= 2; i--) {
    for (long long j = last[i] - 1; j >= 1; j--) {
      if ((!dyn[i][j + 1]) || (!dyn[i + 1][j])) {
        dyn[i][j] = 1;
      } else {
        dyn[i][j] = 0;
      }
    }
  }
  if (a1 == 1) {
    if (!dyn[a1 + 1][b1]) {
      cout << "Masha" << endl;
    } else {
      for (long long i = b1 + 1; i <= b; i++) {
        if (dyn[2][i] == 0) {
          if ((i - b1) % 2 == 1) {
            cout << "Stas" << endl;
          } else {
            cout << "Masha" << endl;
          }
          return 0;
        }
      }
      cout << "Missing" << endl;
    }
    return 0;
  }
  if (dyn[a1][b1] == 1) {
    cout << "Masha" << endl;
  } else {
    cout << "Stas" << endl;
  }
  return 0;
}
