solve the text justification problem.