Stepan's Air Conditioner
In Stepan's office, where he works as a programmer, a new type of air conditioner has been installed. This air conditioner is notable for its simple controls, featuring only two adjustable settings: the desired temperature and the operating mode.
The air conditioner can function in one of the following four modes:
- **freeze** - cooling mode. In this mode, the air conditioner can only lower the temperature. If the current room temperature is already at or below the desired temperature, it will turn off.
- **heat** - heating mode. In this mode, the air conditioner can only raise the temperature. If the current room temperature is already at or above the desired temperature, it will turn off.
- **auto** - automatic mode. In this mode, the air conditioner can both increase and decrease the room temperature to reach the desired level.
- **fan** - ventilation mode. In this mode, the air conditioner only circulates the air without changing the room temperature.
The air conditioner is quite efficient, so when set to the appropriate mode, it adjusts the room temperature to the desired level within an hour.
Your task is to write a program that, given the current room temperature t_room, the desired temperature set on the air conditioner t_cond, and the operating mode, determines the temperature that will be reached in the room after an hour.
**Input format:** The first line of the input contains two integers t_room and t_cond, separated by a single space (-50 ≤ t_room ≤ 50, -50 ≤ t_cond ≤ 50). The second line contains one word, written in lowercase Latin letters, indicating the operating mode of the air conditioner.
**Output format:** The output should be a single integer representing the temperature that will be established in the room after an hour.
**Explanation of examples:**
In the first example, the air conditioner is set to heating mode. After an hour, it will heat the room to the desired temperature of 20 degrees.
In the second example, the air conditioner is set to cooling mode. Since the room temperature is already lower than the desired temperature, the air conditioner will turn off automatically, and the room temperature will remain unchanged.