Module: (Python) Conditional statement


Problem

14 /17


A Picky Bride

Problem

A picky bride follows the rule "the groom should be older than her, but not by much" when choosing a husband. Given the known ages of the bride (N) and the grooms: R, F, and S (all groom ages are different and greater than the bride's age), determine which groom she will choose - the first one, the second one, or the third one.

Input format
The program receives four numbers as input, one per line:

  • The age of the bride (N) on the first line.
  • The ages of the grooms (R, F, and S) on the following three lines.

Output format
Output the letter of the groom (R, F, or S) chosen by the bride.

 
Example
N Input Output
1 25
26
27
28
R