#include <bits/stdc++.h>
using namespace std;
const int maxC = 2 * 1000 * 1000 * 1000;
int a, b;
int n;
int power(int a, int b) {
  int x = 1;
  for (int i = 1; i <= b; i++)
    if (maxC / a >= x)
      x *= a;
    else
      return maxC;
  return x;
}
int go(int a, int b) {
  if (power(a, b) >= n) return -1;
  if (a == 1 && power(2, b) >= n) return 0;
  int s = go(a, b + 1);
  if (s == 1) {
    return -1;
  }
  int t = go(a + 1, b);
  if (t == 1) return -1;
  if (s == 0 || t == 0) return 0;
  return 1;
}
int main() {
  while (scanf("%d %d %lld", &a, &b, &n) != EOF) {
    int s = go(a, b + 1);
    if (s == 1) {
      puts("Masha");
      continue;
    }
    int t = go(a + 1, b);
    if (t == 1) {
      puts("Masha");
      continue;
    }
    if (s == 0 || t == 0) {
      puts("Missing");
      continue;
    }
    puts("Stas");
  }
  return 0;
}
