Solve grph problem.