❔ Creating a hierarchy algorithm - C#