The city of Sousse is a popular touristic destination, it has n important locations connected by m directed streets.
A popular tourist activity is to take a "walk" through the city: starting at some location and moving along a sequence of directed streets to reach another location. The length of the walk is the number of streets traversed.
For statistical purposes, the city wants to know the total number of possible walks in the city that use at most L streets. This includes walks between any starting point $$$u$$$ and any ending point $$$v$$$ (including walks of length $$$0$$$, where the tourist stays at the same location).
Since the numbers can be huge, they should be reported modulo $$$M=10^9+7=1000000007$$$.
Given the directed graph of $$$n$$$ locations and $$$m$$$ streets, calculate a single integer: the total number of walks of length between $$$0$$$ and $$$L$$$ (inclusive) over all ordered pairs of locations $$$(u, v)$$$, modulo $$$M$$$.
Print a single integer: the total number of walks of length at most $$$L$$$ over all ordered pairs $$$(u, v)$$$, modulo $$$M=1000000007$$$.
5 7 1001 21 32 33 41 44 52 5
22
7 6 11 21 32 42 53 63 7
13
5 5 10001 22 33 44 55 1
5005