Nested div elemment onclick calls all div’s click event

I have html code as bellow;

<div onclick=alert("First div")>
    <div onclick=alert("Second div")>
        <div onclick=alert("Third div")>
        </div>
    </div>
</div>

The problem is when inner most div is clicked all three alert message displayed.

How can I modify the code so that only 1 alert message will display corresponding to div tag.