3-D structure WA

Code Link : https://ide.codingblocks.com/s/88015
Can you please tell me, how to solve 3d-structure?