Categorical time series sequencing