"I'm tired of seeing the same scenery in the world." ---

's world can be simplified as a directed graph

with

vertices and

edges.
A

in

is an ordered list of vertices
)
for some non-negative integer

such that

is an edge in

for all

. A

can be empty in this problem.
A

in

is an ordered list of distinct vertices
)
for some positive integer

such that
%20%5Cbmod%20t%7D)
is an edge in

for all

. All circular shifts of a cycle are considered the same.

satisfies the following property: Every vertex is in at most one cycle.
Given a fixed integer

, count the number of pairs
)
modulo

such that
-
are paths; - For every vertex
, v is in
or
; - Let c(P, v) be the number of occurrences of v in path P. For every vertex v of G,
.