Wrote solution.