#include <bits/stdc++.h>
using namespace std;
map<pair<int, int>, int> mp;
double lim[35];
int n;
int ans[100000];
int dfs(int a, int b) {
  int a1, a2;
  pair<int, int> p = make_pair(a, b);
  if (mp[p]) return mp[p] - 1;
  if (b == 1 && a >= lim[2]) {
    mp[p] = (n - 1 - a) % 2 + 1;
    return mp[p] - 1;
  }
  if (a + 1 < lim[b])
    a1 = dfs(a + 1, b);
  else
    a1 = -1;
  if (a < lim[b + 1])
    a2 = dfs(a, b + 1);
  else
    a2 = -1;
  mp[p] = (a1 * a2 == 0 ? (1 + (a1 == 1 || a2 == 1)) : 0) + 1;
  return mp[p] - 1;
}
int main() {
  int a, b, i, res;
  scanf("%d%d%d", &a, &b, &n);
  for (i = 1; i <= 31; i++) lim[i] = pow(n, 1.0 / i);
  if (a != 1) {
    res = dfs(a, b);
    puts(res ? "Masha" : "Stas");
  } else {
    if (lim[b] > 2)
      dfs(2, b);
    else {
      puts("Missing");
      return 0;
    }
    for (i = 0; lim[b] > 2 && mp[make_pair(2, b)] - 1; i++, b++)
      ;
    if (lim[b] <= 2)
      puts("Missing");
    else
      puts((i & 1) ? "Stas" : "Masha");
  }
  return 0;
}
