#include <bits/stdc++.h>
using namespace std;
int m, n, j, k, l, i, o, p, __t;
long long maxi;
int f[32020][40];
char ch;
void read(int &a) {
  for (ch = getchar(); (ch < '0' || ch > '9') && (ch != '-'); ch = getchar())
    ;
  if (ch == '-')
    a = 0, __t = -1;
  else
    a = ch - '0', __t = 1;
  for (ch = getchar(); ch >= '0' && ch <= '9'; ch = getchar())
    a = a * 10 + ch - '0';
  a *= __t;
}
long long exp(long long a, long long t) {
  long long ret = 1;
  for (long long i = 1; i <= t; i *= 2LL, a = a * a)
    if (t & i) ret = ret * a;
  return ret;
}
int DFS(int a, int b) {
  if (f[a][b] != -1) return f[a][b];
  if (b == 33 && a == 1) return 2;
  if (exp(a, b) >= maxi) return 1;
  if (b == 1 && exp(a, b + 1) >= maxi) return (maxi - a + 1) % 2;
  int f1 = DFS(a + 1, b);
  int f2 = DFS(a, b + 1);
  if ((f1 == 2 && f2 == 1) || (f1 == 1 && f2 == 2)) return f[a][b] = 2;
  if (f1 == 0 || f2 == 0) return f[a][b] = 1;
  return f[a][b] = 0;
}
int main() {
  cin >> m >> n >> maxi;
  memset(f, -1, sizeof f);
  int t = DFS(m, n);
  if (t == 1)
    printf("Masha\n");
  else if (t == 0)
    printf("Stas\n");
  else
    printf("Missing\n");
}
