A teacher of Computer Science and Mathematics has two options: use precious classroom time in routine operations and boring formulas, thus killing the interest of students and hampering their intellectual development, or challenge their curiosity by formulating interesting and stimulating questions giving them a taste for independent thinking. The teacher need only provide the building blocks and let students themselves form more complex structures, providing them timely hints when needed. In this paper we demonstrate how a very simple procedure can be used, with minor modifications, as a building block to solve a variety of seemingly unrelated problems in the field of graph algorithms.