Finding the same words and push them in a line