Added the solution for problem "dualpal"