Problem: you are given a directed graph with nodes and edges. Divide the nodes into kingdoms such that you can travel from any city to any other city in the same kingdom (following directed edges). Minimize the number of kingdoms.
Print the number of kingdoms and assign each node a kingdom ID. This problem is directly asking for SCCs. Each SCC is one kingdom because all nodes in an SCC can reach each other.