#include <bits/stdc++.h>
using namespace std;
const long double PI = 3.141592653589793238462643l;
void solve();
int main() {
  solve();
  return 0;
}
long long n;
long long st(long long a, long long b) {
  long long res = 1;
  for (long long i = 0; i < b; i++) {
    if (res >= n) return 1;
    res *= a;
  }
  if (res < n) return 0;
  return 1;
}
long long qwerty(long long s, long long l, long long r) {
  if (l == 1 && st(1, s)) return -1;
  if (l + 1 == r) return l;
  if (st((l + r) / 2, s))
    return qwerty(s, l, (l + r) / 2);
  else
    return qwerty(s, (l + r) / 2, r);
}
vector<vector<long long> > x(41);
long long mas[50];
long long cnt(long long a, long long b) {
  if (a > mas[b]) return 2;
  if (a > 1 && b > 1 && x[b][a] != -1) return x[b][a];
  if (b == 1 && a != 1) {
    if (a <= mas[2]) {
      if (cnt(a + 1, b) == 1 || cnt(a, b + 1) == 1) return x[b][a] = 2;
      return x[b][a] = 1;
    } else {
      if ((n - a) % 2) return 1;
      return 2;
    }
  }
  if (a == 1) {
    if (b >= 30) {
      return 0;
    }
    long long z = cnt(a, b + 1), t = cnt(a + 1, b);
    if (t == 1 || z == 1) return x[b][a] = 2;
    if (z == 0) return x[b][a] = 0;
    if (z == 2) return x[b][a] = 1;
  }
  long long z = cnt(a, b + 1), t = cnt(a + 1, b);
  if (z == 1 || t == 1) return x[b][a] = 2;
  return x[b][a] = 1;
}
void solve() {
  long long a, b;
  cin >> a >> b;
  cin >> n;
  for (long long i = 1; i <= 30; i++) mas[i] = qwerty(i, 1, n);
  x[1].resize(mas[2] + 2);
  for (long long i = 2; i <= 30; i++) x[i].resize(mas[i] + 2);
  for (long long i = 0; i <= 30; i++)
    for (long long j = 0; j < x[i].size(); j++) x[i][j] = -1;
  long long f = cnt(a, b);
  if (f == 2)
    cout << "Masha";
  else if (f == 0)
    cout << "Missing";
  else if (f == 1)
    cout << "Stas";
}
