4281: Beaver Game

内存限制:256 MB 时间限制:2 S 标准输入输出
题目类型:传统 评测方式:文本比较 上传者:
提交:5 通过:5

题目描述

C. Beaver Game
两只海狸,帖木儿和马塞尔,玩下面的游戏。
有n根原木,每根长度正好为m米。海狸轮流移动。海狸每次移动都会选择一根原木,并将其啃成若干(多于一根)相等的部分,每根原木的长度用整数表示,且不小于k米。每个产生的部分也是一根原木,将来任何海狸都可以啃食。行动不便的海狸输了。因此,另一只海狸获胜。
帖木儿迈出了第一步。球员们以最佳方式比赛。确定获胜者。

Two beavers, Timur and Marsel, play the following game.
There are n logs, each of exactly m meters in length. The beavers move in turns. For each move a beaver chooses a log and gnaws it into some number (more than one) of equal parts, the length of each one is expressed by an integer and is no less than k meters. Each resulting part is also a log which can be gnawed in future by any beaver. The beaver that can't make a move loses. Thus, the other beaver wins.
Timur makes the first move. The players play in the optimal way. Determine the winner.
Input
The first line contains three integers n, m, k (1≤n,m,k≤109).
Output
Print "Timur", if Timur wins, or "Marsel", if Marsel wins. You should print everything without the quotes.
Examples
Input
1 15 4
Output
Timur
Input
4 9 5
Output
Marsel
Note
In the first sample the beavers only have one log, of 15 meters in length. Timur moves first. The only move he can do is to split the log into 3 parts each 5 meters in length. Then Marsel moves but he can't split any of the resulting logs, as k=4. Thus, the winner is Timur.
In the second example the beavers have 4 logs 9 meters in length. Timur can't split any of them, so that the resulting parts possessed the length of not less than 5 meters, that's why he loses instantly.

输入格式

输入
第一行包含三个整数n、m、k(1≤n,m,k≤109)。

输出格式

输出
如果帖木儿获胜,则打印“帖木儿”;如果马塞尔获胜,则显示“马塞尔”。你应该打印没有引号的所有内容。

输入样例 复制

1 15 4

输出样例 复制

Timur