Independent and dependent clauses classification
Solution 1:
Tree Diagram of 'fused' relative construction, showing that both the subject and the predicative complement are NPs containing an embedded relative clause.
The pronoun "what" functions simultaneously as head of the NPs and object (in pre-nuclear position) in the relative clauses.