that I do, am working on it without having an exact idea of the line length, I tried giving a big number as a limit but that also didn't work
bread, vegetables, fruits
bread, butter, oil
oil, water, wheat
I would then choose the distinct elements
bread vegetables fruits butter oil water wheat