Copy lines and replace beginning of some lines : <p>I have a file containing lines of the form</p>

<pre><code>this is block 1
a 1 2 3
this is block 2
a 3 1 9
this is block 3
a 10 2 32
...
</code></pre>

<p>I would like to copy some of the lines and replace the beginning so that it becomes:</p>

<pre><code>this is block 1
a 1 2 3
b 1 2 3
c 1 2 3
this is block 2
a 3 1 9
b 3 1 9
c 3 1 9
this is block 3
a 10 2 32
b 10 2 32
c 10 2 32
...
</code></pre>

<p>Not sure how to solve this with awk, sed or another elegant option. </p>
