#include <bits/stdc++.h>
using namespace std;
const int N = 10010, M = 40, WIN = 1, LOSE = 2, TIE = 0;
int f[N * 5][M * 2], vis[N * 5][M * 2];
int limit, n, m;
long long pow(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans *= a;
    if (ans > limit || ans < 0) return limit + 1;
    a = a * a;
    b >>= 1;
  }
  return ans;
}
int dp(int x, int y) {
  if (vis[x][y]) return f[x][y];
  vis[x][y] = 1;
  int &r = f[x][y];
  if (x == 1 && pow(2, y) >= limit) return r = TIE;
  if (x * x >= limit && y == 1) return r = limit - x & 1 ? LOSE : WIN;
  if (pow(x, y) >= limit) return r = WIN;
  int r1 = dp(x + 1, y), r2 = dp(x, y + 1);
  if (r1 == LOSE || r2 == LOSE) return r = WIN;
  if (r1 == TIE || r2 == TIE) return r = TIE;
  return r = LOSE;
}
int main() {
  scanf("%d %d %d", &n, &m, &limit);
  int ans = dp(n, m);
  if (ans == LOSE)
    puts("Stas");
  else if (ans == WIN)
    puts("Masha");
  else
    puts("Missing");
}
