Implemented recursive pattern generation.

Output print and SDC filter left.