select_sequential function

sequentially select an element, the one that corresponds according to the number passed as a parameter.