printing the solution