Solution of the assignment