Implemented checking the input solution.