I ran into a problem and can't find a solution to fix the following issue. 

I want to copy the first word of a line to the beginning of the following n lines if they start with a special character, else copy the new word.

Input: 

```
aaa random words

`dsf

|df

bbb

|d

```

Output:

```
aaa random words

aaa`dsf

aaa|df

bbb

bbb|d

```