# Design tally reads the whole input before counting. Inputs are small, and one pass over a string is simpler than a streaming reader.