#include <bits/stdc++.h>
using namespace std;
int a, b, n;
int f[33333][33];
bool pow(const int A, const int B) {
  if (A == 1) return 0;
  for (int i = 1, p = 1; i <= B; ++i)
    if (n / A >= p)
      p *= A;
    else
      return 1;
  return 0;
}
int Gans(const int A, const int B) {
  if (f[A][B] != 0) return f[A][B];
  if (B > 30 && A == 1) return f[A][B] = 3;
  if (B == 1 && (long long)A * A > n) return f[A][B] = 2 - ((n - A) & 1);
  if (pow(A, B)) return f[A][B] = 1;
  int x = Gans(A, B + 1), y = Gans(A + 1, B);
  if (x == 1 && y == 1) return f[A][B] = 2;
  if (x == 2 || y == 2) return f[A][B] = 1;
  return f[A][B] = 3;
}
int main() {
  scanf("%d%d%d", &a, &b, &n);
  --n;
  int p = Gans(a, b);
  if (p == 1)
    puts("Masha");
  else if (p == 2)
    puts("Stas");
  else
    puts("Missing");
  return 0;
}
