题目链接:http://codeforces.com/gym/102219/problem/I
Time limit per test 1.0 s Memory limit per test 256 MB

Description

Ethics regarding artificial intelligence (AI) is an important topic at current times. With recent advancement in the field of self-learning algorithms, the scientific community is facing a hard question of how to introduce ethics in software systems. The question of ethics is particularly difficult due to its subjective nature. What is considered 'right' by a particular viewpoint is not necessarily considered 'right' by every other viewpoint.

The question of ethics in AI agents becomes even more difficult when the agents are faced with ethical dilemmas. Ethical dilemmas are situations when there is no clear answer regarding the best solution to a problem because all possible solutions lead to certain negative impact. For example, if you press a button then 1 person will die and if you do not press the button then 5 persons will die. If these two are the options then which to follow. If the system believes in the philosophy of non-maleficence, doing the least amount of harm, then the system would take the course of pressing the button and let 1 person die instead of 5 people.

This example is a very simplified approach of portraying an ethical dilemma, but in real life, the AI agents would face much more complex and subtle scenarios requiring a proper ethical framework for them to follow.

In this problem, we are dealing with a RoboTaxi that can only go straight (a lucky one). You will be provided with a snapshot of a 3lane road with multiple obstacles in it. You will have to determine whether the RoboTaxi will crash or not within the given snapshot.

Input

The input consists of 3 lines.

A '=' indicates the position of the RoboTaxi.

'H' indicates human in the lane.

'T' indicates tree in the lane.

'P' indicates parked car in the lane.

'.' indicates empty space in the lane.

The length of the road will be 10.

Output

Output will be the indicator of the first obstacle that the RoboTaxi crashes into. If no crash occurs then output 'Youshallpass!!!'.

Examples

input

..........
=.........
..........

output

You shall pass!!!

input

..........
=........H
..........

output

H

input

..........
=........T
..........

output

T

input

.........P
=.......TH
.........P

output

T

Problem solving report:

Description: 给你一个3*10的矩阵,里面有RoboTaxi‘=’、人‘H’、树‘T’、车‘P’,道路‘.’,求小车遇到的障碍物,如果没遇到障碍物输出‘You shall pass!!!’。
Problem solving: 找到‘=’的位置,直接向右就行了。

Accepted Code:

/* 
 * @Author: lzyws739307453 
 * @Language: C++ 
 */
#include <bits/stdc++.h>
using namespace std;
int main() {
    char str[5][15];
    int sx, sy;
    for (int i = 0; i < 3; i++)
        scanf("%s", str[i]);
    for (int i = 0; i < 3; i++) {
        for (int j = 0; j < 10; j++) {
            if (str[i][j] == '=') {
                sx = i, sy = j;
                break;
            }
        }
    }
    int l = sy + 1;
    while (l < 10) {
        if (str[sx][l] != '.')
            break;
        l++;
    }
    if (l < 10)
        printf("%c\n", str[sx][l]);
    else printf("You shall pass!!!\n");
    return 0;
}