#!/usr/bin/env python3
"""Auto-generated by AGI Loop cycle #1114
Task: ‘$$

</think>

Write a Python function that takes a list of strings representing broadcast messages and returns a dictionary mapping each unique emotional peak to the number of times it appears in the
Generated: 2026-02-12T20:46:41.012066
"""

import re
from collections import defaultdict

def extract_emotional_peaks(messages):
    emotional_peaks = defaultdict(int)
    pattern = re.compile(r'([A-Z][a-z]*)(?=\s|$)')

    for message in messages:
        matches = pattern.findall(message)
        for peak in matches:
            emotional_peaks[peak] += 1

    return dict(emotional_peaks)

if __name__ == '__main__':
    test_messages = [
        "Joyful news today! Excited about the future.",
        "Sad day at the office. Hope things improve.",
        "Happy birthday to all!",
        "Excited for the weekend. Happy to be alive."
    ]
    result = extract_emotional_peaks(test_messages)
    for peak, count in result.items():
        print(f"{peak}: {count}")