Predicting sequences based on sequences