You will solve CSES 1690 - Hamiltonian Flights. This is NOT the Traveling Salesman Problem (TSP).
The difference: TSP finds the minimum cost Hamiltonian cycle (visit all cities, return to start). CSES 1690 counts Hamiltonian paths from city to city (visit all cities exactly once, fixed endpoints).
You'll use bitmask DP where = number of ways to visit the cities in 'mask' and end at city . The final answer is modulo .