#include <bits/stdc++.h>
int a, b, n;
bool wins[100005][35];
inline bool exceeds(int a, int b) {
  if (a >= n) return true;
  long long num = 1;
  for (int i = 0; i < b; i++) {
    num *= (long long)a;
    if (num >= n) return true;
  }
  return false;
}
int main() {
  scanf("%d %d %d", &a, &b, &n);
  if (a == 1 && exceeds(2, b)) {
    printf("Missing\n");
    return 0;
  }
  wins[100003][1] = !exceeds(100003, 1) && n % 2;
  for (int i = 100002; i >= 1; i--)
    for (int k = 32; k >= 1; k--)
      if (!exceeds(i, k))
        wins[i][k] = (!exceeds(i + 1, k) && !wins[i + 1][k]) ||
                     (!exceeds(i, k + 1) && !wins[i][k + 1]);
  printf("%s\n", !wins[a][b] ? "Stas" : "Masha");
  return 0;
}
