We describe reaction-diffusion rules for template-driven polymerization of nucleic acid sequences. Simulations of the model reproduce experimentally determined RNA structure and demonstrate self-replication. A C++ implementation is available at https://github.com/evoldoers/carnaval