#include <bits/stdc++.h>
using namespace std;
const int N = 102;
const int M = 2e4 + 10;
int dp[N][M];
int t[N * 2];
int d[N];
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    int n, l, k;
    memset(dp, 0, sizeof(dp));
    scanf("%d%d%d", &n, &k, &l);
    for (int i = 1; i <= n; i++) scanf("%d", d + i);
    for (int i = 0; i <= k; i++) t[i] = i;
    for (int i = k + 1; i < 2 * k; i++) t[i] = 2 * k - i;
    for (int i = 0; i < 2 * k; i++) dp[0][i] = 1;
    for (int i = 1; i <= n; i++) {
      for (int j = 0; j < 2 * k * n; j++) {
        dp[i][j] = max(dp[i - 1][j - 1], dp[i][j - 1]);
        if (l < d[i] + t[j % (2 * k)]) dp[i][j] = 0;
      }
    }
    bool can = 0;
    for (int j = 0; j < 2 * k * n; j++) {
      if (dp[n][j]) {
        can = 1;
        break;
      }
    }
    if (can)
      puts("Yes");
    else
      puts("No");
  }
  return 0;
}
