Python Solution for the Bus Station Problem