406026: GYM102219 I To Crash Or Not To Crash

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

I. To Crash Or Not To Crashtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

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 $$$3 lane$$$ 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 '$$$You shall pass!!!$$$'.

ExamplesInput
..........
=.........
..........
Output
You shall pass!!!
Input
..........
=........H
..........
Output
H
Input
..........
=........T
..........
Output
T
Input
.........P
=.......TH
.........P
Output
T

加入题单

上一题 下一题 算法标签: