Submitted Hard problem solution.