

The first line contains an integer ‘T’ denoting the number of test cases. Then each test case follows.
The first input line of each test case contains 4 space-separated integers ‘N’, ‘r’, ‘b’ and ‘g’ described as above in the problem.
For each test case, print the number of all possible strings of length ‘N’ with constraints as described in the problem statement.
The output of each test case will be printed in a separate line.
You do not need to print anything; it has already been taken care of. Just implement the function.
1 <= T <= 50
1 <= N <= 20
1 <= r <= N
1 <= b <= N
1 <= g <= N
r + g + b <= N
Time limit: 1 sec
The key idea of this approach is to fix the number of ‘R’s , ‘G’s and ‘B’s in the string and count all the permutations.
Consider the following steps: