#include <bits/stdc++.h>
const int MAXL = 20;
const long long MOD = 1000000007;
const int MAXK = 10000 + 10;
const int MAXN = 35000 + 10;
const int MAXM = 35;
using namespace std;
int a, b, n, sg[MAXN][MAXM];
long long pow(int a, int b) {
  if (b == 0) return 1ll;
  if (b == 1) return (long long)a;
  long long tmp = pow(a, b / 2);
  if (b % 2 == 0)
    return tmp * tmp;
  else
    return (long long)tmp * tmp * (long long)a;
}
int dfs(int a, int b) {
  if (sg[a][b] >= 0) return sg[a][b];
  if (pow(a, b) >= (long long)n) {
    return sg[a][b] = 1;
  }
  int Ans = 0;
  Ans |= !dfs(a + 1, b);
  Ans |= !dfs(a, b + 1);
  return sg[a][b] = Ans;
}
int work_2(int a) {
  int b = 1, turn = 0;
  int up = (int)sqrt((double)n - 0.0000001);
  while (a <= up) {
    if (sg[a][b + 1] == 0) return (turn == 0);
    a++;
    turn = turn ^ 1;
  }
  turn = (turn + (n - 1 - a)) % 2;
  return turn;
}
int work_1(int b) {
  int a = 1;
  if (pow(a, b) >= n)
    return 0;
  else {
    int turn = 0;
    for (; !(pow(2, b) >= n); b++) {
      if (sg[a + 1][b] == 0) {
        if (turn == 0)
          return 1;
        else
          return -1;
      }
      turn ^= 1;
    }
    return 0;
  }
}
int main() {
  memset(sg, -1, sizeof(sg));
  scanf("%d%d%d", &a, &b, &n);
  if (pow(a, b) >= n) {
    puts("Masha");
    return 0;
  }
  dfs(2, 2);
  if (a != 1 && b != 1) {
    if (sg[a][b] != 0)
      printf("Masha");
    else
      printf("Stas");
    return 0;
  }
  if (a == 1 && b == 1) {
    int c = work_1(b + 1);
    int d = work_2(a + 1);
    if (c < 0 || d == 0)
      printf("Masha");
    else if (c == 0)
      printf("Missing");
    else
      printf("Stas");
  } else if (b == 1) {
    if (work_2(a) != 0)
      printf("Masha");
    else
      printf("Stas");
  } else if (a == 1) {
    int tmp = work_1(b);
    if (tmp == 0)
      printf("Missing");
    else if (tmp == 1)
      printf("Masha");
    else
      printf("Stas");
  }
  return 0;
}
