<p>Consider graphs built with the units A: <img src="https://projecteuler.net/project/images/p194_GraphA.png" style="vertical-align:middle;" class="dark_img" alt="" />
and B: <img src="https://projecteuler.net/project/images/p194_GraphB.png" style="vertical-align:middle;" class="dark_img" alt="" />, where the units are glued along
the vertical edges as in the graph <img src="https://projecteuler.net/project/images/p194_Fig.png" class="dark_img" style="vertical-align:middle;" alt="" />.</p>
<p>A configuration of type (<var>a</var>,<var>b</var>,<var>c</var>) is a graph thus built of <var>a</var> units A and <var>b</var> units B, where the graph's vertices are coloured using up to <var>c</var> colours, so that no two adjacent vertices have the same colour.<br />
The compound graph above is an example of a configuration of type (2,2,6), in fact of type (2,2,<var>c</var>) for all <var>c</var> ≥ 4.</p>
<p>Let N(<var>a</var>,<var>b</var>,<var>c</var>) be the number of configurations of type (<var>a</var>,<var>b</var>,<var>c</var>).<br />
For example, N(1,0,3) = 24, N(0,2,4) = 92928 and N(2,2,3) = 20736.</p>
<p>Find the last 8 digits of N(25,75,1984).</p>