Minimum Cost to Separate Sentence Into Rows