Rugby Club

Interview

Time limit1sMemory limit128 MB

Summary
Read repeated name/age/weight lines until a sentinel and print whether each member is Senior or Junior based on simple thresholds.
Level

Easy1 of 10

Topics
Implementation
Solved
No attempts yet

Problem

Members of a rugby club are classified as either senior or junior.

A member is senior if their age is greater than 17 or their weight is at least 80 kg. Otherwise, the member is junior. Classify each member correctly.

Input

Each line contains a member's name, age, and weight, separated by spaces. The final line is # 0 0; do not process this line.

A name contains only uppercase and lowercase English letters, and its length is at most 10.

Output

For each member in the input, print the member's name and classification on one line. Print Senior for a senior member and Junior for a junior member.

Examples1

  1. Example 1

    Input
    Joe 16 34
    Bill 18 65
    Billy 17 65
    Sam 17 85
    # 0 0
    
    Expected output
    Joe Junior
    Bill Senior
    Billy Junior
    Sam Senior