How to realize many to many predict with LSTM?

Any kind of continued sequence prediction counts as many-to-many - common examples are language models (generating a sequence of characters/words based on previous sequence) and time series prediction (predicting e.g. future stock price, seismic data based on previous history)