m = 4000; o = 998244353
a = [[1]*(m+1)]+[[0]*(m+1) for _ in range(m)]
for i in range(1,m+1):
    for j in range(1,i+1): a[i][j] = (a[i][j]+a[i-j][j])%o
    for j in range(m): a[i][j+1] = (a[i][j]+a[i][j+1])%o
for _ in range(int(input())):
    f,n,k = map(int,input().split())
    print(a[n][k])