5577: Shampoo洗发水(ABC243A)

内存限制:1024 MB 时间限制:2.000 S
评测方式:文本比较 命题人:
提交:0 解决:0

题目描述

Problem Statement:

Three people live in Xiaoniu's house: Xiaoniu, his father, and his mother. All of them wash their hair in the bathroom each night.  
His father, his mother, and  Xiaoniu take a bath in this order and use $A$, $B$, and $C$ milliliters of shampoo, respectively.

This morning, the bottle contained $V$ milliliters of shampoo. Without refilling, who will be the first to run short of shampoo to wash their hair?

小牛家里住着三个人:小牛、他的父亲和他的母亲。他们每天晚上都在浴室洗头。他的父亲、母亲和小牛按这个顺序洗澡,分别使用 A、B 和 C 毫升的洗发水。今天早上,瓶子里含有 V 毫升的洗发水。在不补充的情况下,谁会第一个用完洗头的洗发水?


输入

V A B C

输出


If the first person to run short of shampoo to wash their hair is Takahashi's father, print `F`; if it is Takahashi's mother, print `M`; if it is Takahashi, print `T`.

如果第一个用完洗发水的人是小高的父亲,输出 F;如果是小高的母亲,输出 M;如果是小高,输出 T


样例输入 复制

25 10 11 12

样例输出 复制

T

提示

 Constraints:

-   $1 \leq V,A,B,C \leq 10^5$
-   All values in input are integers.

来源/分类