#include <bits/stdc++.h>
using namespace std;
int a, b, n;
bool pos(int x, int y) {
  long long int res = 1;
  for (int i = 0; i < y; i++) {
    res = res * x;
    if (res >= n) return false;
  }
  return true;
}
bool func(int x, int y) {
  bool f1 = true, f2 = true;
  if (pos(x, y + 1)) f1 = func(x, y + 1);
  if (f1 == false) return true;
  if (pos(x + 1, y)) f2 = func(x + 1, y);
  bool ans = false;
  ans = ans or !f1;
  ans = ans or !f2;
  return ans;
}
int main() {
  cin >> a >> b >> n;
  if (a == 1) {
    int f = 0;
    for (int i = 0; i < 70; i++) {
      if (pos(a + 1, b + i) and !func(a + 1, b + i)) {
        if (i % 2 == 0)
          cout << "Masha" << endl;
        else
          cout << "Stas" << endl;
        f = 1;
        break;
      }
    }
    if (f == 0) cout << "Missing" << endl;
  } else {
    if (func(a, b))
      cout << "Masha" << endl;
    else
      cout << "Stas" << endl;
  }
}
