Writing question - reference.

<p>Lets say the sentence is
The “A material” was a great choice for holding the “Y material”, having existed only briefly before it became obsolete.</p>

<p>Here, does the word “having” modify the “A material” or the “Y material”?
Please explain. Thanks!</p>

<p>“A material.” A clause like that modifies the subject of the sentence, which is “A material.” If it were describing the “Y material” it would say: ‘The “A material” was a great choice for holding the “Y material”, which existed only briefly before it became obsolete.’</p>