Dynamic approach does not work; try traditional solution