Title 53, Chapter 12, Section 113
If a valid charitable bequest, trust, or gift cannot be executed in
the exact manner provided by the testator, settlor, or donor, the
superior court will exercise equitable powers in such a way as will
as nearly as possible effectuate the intention of the testator,
settlor, or donor.