```
<div class="b">
<h1>Hello</h1>
<div class="a">
<p class="ABC">A..........Z</p> //this could be present in some pages
</div>
</div>

```

This is a piece of code in which I want to add css properties to `<h1>` of div with class "b" if `<p>` contains `class="ABC"`.
How to do it?