The repo for the original Java-based challenge states that station names will be between 1 and 100 bytes long. In practice, the test data uses shorter names, and the first few bytes of each name happen to be distinct from other names, so you can cut some corners and still arrive at the correct result.