An Algorithm for Routing Vectors in Sequences