Another solution for generating permeation problem using recursive way;