The function ZZ is defined as follows.
ZZ(0,1)=a
ZZ(0,2)=b
ZZ(0,k)=ZZ(0,k−1)+ZZ(0,k−2)(k>2)
ZZ(i,k)=∑j=1kZZ(i−1,j)(i≥1, k≥1)
Given four integers a, b, c, d, write a program that computes ZZ(c,d).
The first line contains the number of test cases T. (T≤200)
Each of the next T lines holds one test case as four integers a, b, c, d. (0≤a,b≤1000000000, 1≤c≤100, 1≤c×d≤100000000)
For each test case, print ZZ(c,d) modulo 1000000009 on its own line.