in reply to Re^2: read a word from a line
in thread read a word from a line

Okay, that's clearer, especially now that you've changed your desired output. In your original question your desired output was

end process