//============================================================================
// Name        : [email protected]	E. What Has Dirichlet Got to Do with That?
// Author      : LiJunLe
// Version     : Accepted
// Copyright   : http://www.codeforces.com/contest/39/problem/E
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include <stdio.h>

#define MISS 0
#define LOST 1
#define WIN 2

using namespace std;
typedef long long LL;

LL n;

LL power(int a, int b) {
	if (b == 0) {
		return 1;
	}
	LL ret = power(a, b / 2);
	if (b & 1) {
		return ret * ret * a;
	} else {
		return ret * ret;
	}
}

int DFS(int a, int b) {
	if (a == 1 && 1 << b >= n) {
		return MISS;
	}
	if (power(a, b) >= n) {
		return WIN;
	}

	int t1 = DFS(a, b + 1);
	if (t1 == LOST) {
		return WIN;
	}

	int t2 = DFS(a + 1, b);
	if (t2 == LOST) {
		return WIN;
	}

	if (t1 == MISS || t2 == MISS) {
		return MISS;
	}
	else {
		return LOST;
	}
}

int main() {
	int a, b;
	while (scanf("%d%d%lld", &a, &b, &n) != EOF) {
		int t = DFS(a, b);
		if (t == WIN) {
			puts("Masha");
		}
		else if (t == MISS) {
			puts("Missing");
		}
		else {
			puts("Stas");
		}
	}
	return 0;
}