Read the input's first line loop: we scan the rest of the input for the first character keep track of the count of chars read find: fox the quick brown fox jumps over the lazy dog find: aaaaab aaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaa