Product Configuration

Greetings to all

I’ve an issue With Product Configuration. Client Requirement is Like this

Test Product has two variants Lets Say A And B. Again A has two different Variants Let’s Say 10 and 20. Same like B has Two variants Let’s say 30 and 40. I’ve configured the system like this. But When I’m selecting the Product and With A the System Showing all Variants Including A and B i.e, 10,20.30.40. But Client Wants to See Only the Related items i.e If u select the A it will be 10 and 20 Only in Drop down list. Meanwhile if we select the B is it should show is 30 and 40 Only. I don’t know where i did a mistake. Please give me the right solution for this.