At first, they identified a number of stars which showed a very STRONG pattern
of lines (later found to be Hydrogen). They were Called 'A' Stars.
Those stars with slightly weaker lines of Hydrogen, were called 'B' Stars and so on.
It was realized by Annie J. Cannon, an assistant at the Harvard Observatory beginning in 1896, that there were really only about 7 unique kinds of stars, and all other LETTERS were dropped.
This order was also found to smoothly vary with the kinds of lines seen. Ms. Cannon classified more than a quarter million stars which were published as The Draper Catalogue in nine volumes, from 1918 to 1924.