Generate rota based on end of rota