Let's say I have this html:

```html
    <a></a>
    <b> </b>
    <c> </c>
    <c>incorrect</c>
    <a></a>
    <c>incorrect</c>
    <b> </b>
    <d> </d>
    <b> </b>
    <a></a>
    <c>incorrect</c>
    <a></a>
    <c>correct</c>
    <a></a>
    <c>incorrect</c>
    <d> </d>

```

How can I select `<c>correct</c>` which is between `<a>` and `<d>`
I thought about something like this:

```
document.querySelector('a~c.d~c');

```

But it doesn't work. Do you have any ideas how can I achieve this ?