# Twelve Days of Christmas — match/case Demo (Python 3.10+)
# Python's match/case does NOT fall through — by deliberate design choice.
# Each matched case executes only its own block, then exits cleanly.
# The cumulative verse must be spelled out explicitly; no free cascading.
# This is the philosophical payoff: JS and Java say "let it cascade,"
# Python says "say exactly what you mean."

def build_verse(day):
    match day:
        case 1:
            return "a partridge in a pear tree."
        case 2:
            return (
                "two turtle doves, and\n"
                "a partridge in a pear tree!"
            )
        case 3:
            return (
                "three French hens,\n"
                "two turtle doves, and\n"
                "a partridge in a pear tree!"
            )
        case _:
            return "Day out of range (try 1-3)"

for day in range(1, 4):
    print(f"Day {day}:")
    print(build_verse(day))
    print()
