#include <bits/stdc++.h>
using namespace std;
const int L = 1000 * 40;
const int M = 35;
int mem[L][M];
int n;
int f(int a, int b) {
  if (a < L && b < M && mem[a][b] != -1) {
    return mem[a][b];
  }
  int ret;
  if (b == 1 && pow(a, 2) >= n) {
    if (a % 2 == n % 2) {
      ret = 1;
    } else {
      ret = 0;
    }
  } else if (pow(a, b) >= n) {
    ret = 1;
  } else {
    int u = f(a + 1, b);
    if (u == 0) {
      ret = 1;
    } else {
      if (a == 1 && pow(2, b) >= n) {
        ret = 2;
      } else {
        int v = f(a, b + 1);
        if (v == 0) {
          ret = 1;
        } else if (v == 1) {
          ret = 0;
        } else {
          ret = 2;
        }
      }
    }
  }
  if (a < L && b < M) {
    mem[a][b] = ret;
  }
  return ret;
}
int main() {
  memset(mem, -1, sizeof(mem));
  int a, b;
  cin >> a >> b >> n;
  switch (f(a, b)) {
    case 0:
      cout << "Stas" << endl;
      break;
    case 1:
      cout << "Masha" << endl;
      break;
    case 2:
      cout << "Missing" << endl;
      break;
  }
  return 0;
}
