mod = 998244353 s = 4005 m = [[0]*s for _ in range(s)] m[0][0] = 1 for i in range(s): acc = m[i][0] for j in range(1, s): acc += m[i][j] acc %= mod m[min(s-1, i+j)][j] += acc m[min(s-1, i+j)][j] %= mod m[i][j] += m[i][j-1] m[i][j] %= mod for _ in range(int(input())): t, n, k = map(int, input().split()) print(m[n][k])