WC '17 Contest 4 J1 - Fight or Flight

View as PDF

Submit solution

Points: 3
Time limit: 1.0s
Memory limit: 16M

Problem type
Woburn Challenge 2017-18 Round 4 - Junior Division

On their way to meet up with the remaining members of the Avengers, Captain America and Thor have fallen into an ambush set up by the evil Thanos! They have suddenly found themselves face to face with the Black Order, a fearsome group of supervillains, each with their own dangerous powers. Thanos hopes to deal a crippling blow to the Avengers by taking out two of their members before the impending Infinity War has even begun!

Despite Captain America and Thor being skillful fighters in their own right, the fact that they're outnumbered poses a serious problem. With the Black Order bearing down on them, they have only moments to decide on their course of action – should they engage in combat despite the odds, or attempt to escape?

Captain America's opinion is represented by a string C, which is equal to either Fight or Run. Similarly, Thor's opinion is represented by a string T, which is also equal to either Fight or Run. If the two of them have the same opinion, then it's clear what they'll do! However, if their opinions differ, then their joint indecision may be their downfall…

Given the opinions of the two heroes, determine what their course of action will be – either Fight or Run if they agree, or Undecided if they disagree.

Input Specification

The first line of input consists of a single string, C.
The next line consists of a single string, T.

Output Specification

Output a single string, either the heroes' course of action if they agree, or Undecided if they disagree.

Sample Input 1


Sample Output 1


Sample Input 2


Sample Output 2


Sample Explanations

In the first case, Captain America and Thor both agree to Run, while in the second case, their differing opinions result in their course of action being Undecided.


There are no comments at the moment.