You are given 3n different points on a circle. Each of these points is colored in one of n colors, such that each color appears exactly three times.
You want to draw n non-intersecting arcs with ends on given points.
For these arcs, the ends of the arc should have equal colors, and no other point on the arc should have this color.
Note that you are drawing arcs, not chords.
Find the number of suitable drawings, modulo 998,244,353.