Under construction

Still being built. Things may change

Leg Day

Time limit1sMemory limit1024 MB

Summary
Classify each day of a repeating exercise plan as rest, leg, or arm by keyword, then print a Monday-start 31-day calendar of matching pictographs over 5 weeks.
Level

Easy2 of 10

Topics
String, Simulation, Implementation
Solved
No attempts yet

Problem

A new training plan for the month has days focusing on legs or arms, mixed with rest days. The plan repeats as many times as needed to reach the end of the month.

Each day of the plan is classified as follows. If the day's description contains the word "rest", it is a rest day. Otherwise, if it contains "leg", it is a leg day. If it contains neither word, it is an arm day.

Print a motivational 31-day calendar starting on a Monday, showing what kind of exercise you do on each day.

Input

The first line contains the number of exercises, nn (1≀n≀311 \le n \le 31). Each of the next nn lines contains the name of one exercise, made of between 1 and 50 lowercase Latin characters.

Output

Print 5 lines of UTF-8 text. Each line contains the week number (from 1 to 5) followed by up to 7 pictographs for that week's days. Use characters from the Supplementary Multilingual Plane that illustrate each exercise type. Judging rules:

  • The character must be printable.
  • Leg day characters must have "leg" in their Unicode name.
  • Arm day characters must have "arm" or "biceps" in their Unicode name.
  • Rest day characters must have "face" in their Unicode name.

Once a character represents an exercise type, it must represent that type every time, and no other type.

Examples3

  1. Example 1

    Input
    4
    legcurls
    armgains
    restarms
    bicepsprints
    
    Expected output
    1 🦡πŸ’ͺ😎πŸ’ͺ🦡πŸ’ͺ😎
    2 πŸ’ͺ🦡πŸ’ͺ😎πŸ’ͺ🦡πŸ’ͺ
    3 😎πŸ’ͺ🦡πŸ’ͺ😎πŸ’ͺ🦡
    4 πŸ’ͺ😎πŸ’ͺ🦡πŸ’ͺ😎πŸ’ͺ
    5 🦡πŸ’ͺ😎
    
  2. Example 2

    Input
    1
    workhardplayhardresthard
    
    Expected output
    1 😴😴😴😴😴😴😴
    2 😴😴😴😴😴😴😴
    3 😴😴😴😴😴😴😴
    4 😴😴😴😴😴😴😴
    5 😴😴😴
    
  3. Example 3

    Input
    7
    overestimate
    wrestling
    crestfallen
    pharmaceutic
    forestry
    elegantrestaurant
    delegation
    
    Expected output
    1 πŸ€–πŸ€–πŸ€–πŸ¦ΎπŸ€–πŸ€–πŸ¦Ώ
    2 πŸ€–πŸ€–πŸ€–πŸ¦ΎπŸ€–πŸ€–πŸ¦Ώ
    3 πŸ€–πŸ€–πŸ€–πŸ¦ΎπŸ€–πŸ€–πŸ¦Ώ
    4 πŸ€–πŸ€–πŸ€–πŸ¦ΎπŸ€–πŸ€–πŸ¦Ώ
    5 πŸ€–πŸ€–πŸ€–