Solution (source code)

= Solution

Balancing Hg first, then sulfur, carbon and nitrogen gives
$$
\boxed{\mathrm{2Hg(SCN)_2(s)\longrightarrow2HgS(s)+CS_2(g)+C_3N_4(s)}.}
$$
There are two Hg, four S, four C and four N atoms on each side. This is the stipulated initial decomposition, not a claim that further heating cannot change its products.