#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
const long double pi = acos(-1.0);
const long double eps = 1e-5;
const int INF = 0x3f3f3f3f;
const long long INFLL = 0x3f3f3f3f3f3f3f3f;
bool ans;
int n, k, l;
int d[110];
bool vis[110][110][3];
void dfs(int x, int nh, int dat) {
  if (x > n) {
    ans = true;
    return;
  }
  if (vis[x][nh][dat + 1]) return;
  vis[x][nh][dat + 1] = true;
  nh += dat;
  if (nh <= 0) dat = 1;
  if (nh >= k) dat = -1;
  if (!x || d[x] + nh <= l) dfs(x, nh, dat);
  if (ans) return;
  if (x == n || d[x + 1] + nh <= l) dfs(x + 1, nh, dat);
  if (ans) return;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int T;
  cin >> T;
  while (T--) {
    memset(d, (0), sizeof(d));
    memset(vis, (0), sizeof(vis));
    ans = false;
    cin >> n >> k >> l;
    for (int i = (1); i <= (n); i++) cin >> d[i];
    dfs(0, 0, 1);
    if (ans)
      cout << "Yes" << '\n';
    else
      cout << "No" << '\n';
  }
}
