generate parentsis algorithm. But not recursion.
Need to think about recursive way