A new algorithm for generation of different types of RNA