Can any body please help me with indexing of parent-child Hierarchy Menu like

Basically, iam creating a personal lms.

Main (K-12,NCERT)
->Class (Class 3,Class 4,Class 5)
->Subject (Physics,Chemistry)
->Units (Unit 1,Unit 2)
->Chapter (Chap 1, Chap 2)
->Topic (Topic 1, Topic 2)
->Sub Topic (Sub Top 1, Sub Top 2)
->Sub Sub Topic (Sub Sub Top 1, Sub Sub Top 2)

every topic have its own title and contents

---
NCERT
Class 5
Class 6
Physics
Unit 4
Chapter 1
Chapter 2
Topic 1
Topic 2
Topic 3
Sub Topic 1
Topic 4
Chapter 3
Unit 5
Chemistry
Biology
Class 7
Class 8
Physics
Unit 1
Chemistry
Biology
Unit 4
Unit 5

---
1
2
3
3.1
3.1.1
3.1.1.1
3.1.1.1.1
3.2
3.3
4
5
...
...
n

Thanks
Seyed