Thanks, but unfortunately we have the opposite architecture. And CUG protected pages will be at the end of the nodes hierarchy. For example, we have something similar to the following structure
pageWithFormA
--confirmationPageAWithCUG
pageWithFormB
--confirmationPageBWithCUG
..... and so on
So on the confirmation page, you can get it only after submitting the corresponding form. But all this "confirmationPages" has the same template so it`s convenient to use CUG in template how it was before