How to change package view in IntelliJ?
Click on the gear icon at the top right on the package view, and make sure that "Flatten Packages" and "Compact empty middle packages" are unchecked.
This screen shot taken from IntelliJ IDEA 2017. Most of the time the answer will be same on every Intellij IDE. As JB mentioned this should solve your problem. This screen shot will help a beginner find it easily.