Added solution and code.