Question
Three annotators label each item and report an integer confidence. Produce the final label by weighted vote and count the items where every annotator agreed. ```python def solve(raw: str) -> str: ... ``` - The first line is the item count `n`. Each of the next `n` lines has exactly three `<label>:<confidence>` pairs, where the label is `A` or `B` and the confidence is a nonnegative integer. - Sum the confidence per label. Return `A` when its total is higher, `B` when its total is higher, and `ABSTAIN` on an exact tie. - After the per-item labels, return one final line `agreed=<count>`, where an item is agreed only when all three raw labels match. - Return one label per item in input order, then the agreement line. Do not append a trailing newline.