"""TutorSyntax v24 — fictional security-log analysis (no live connections).
Run alongside fictional_security_events.csv in the same folder.
"""
import csv
from collections import Counter
from pathlib import Path

file_path = Path(__file__).with_name("fictional_security_events.csv")
with file_path.open(newline="", encoding="utf-8") as file:
    rows = list(csv.DictReader(file))

for account in sorted(set(row["fictional_account"] for row in rows)):
    events = [row for row in rows if row["fictional_account"] == account]
    counts = Counter(row["event"] for row in events)
    print(account, dict(counts))
# Challenge: inspect timestamps and propose two possible interpretations.
# A sequence of log events suggests where to investigate; it is not proof of a crime.
