Answer should be 18
For left half all the 1's are compulsory to add to cover the vertices so we are left with 3 choices for the 2's
In the middle we have 2 choice we can take any one out of this 2's
In the right hand side all 1's are compulsory and we will left with 3 choices for 2's
3*2*3 =18