#include <bits/stdc++.h>
using namespace std;
const int N = 105;
int d[N];
struct Node {
  int pos, tide;
  bool down;
  bool operator<(const Node& rhs) const {
    if (pos != rhs.pos)
      return pos < rhs.pos;
    else {
      if (tide != rhs.tide)
        return tide < rhs.tide;
      else
        return down < rhs.down;
    }
  }
};
int n, k, l;
set<Node> v;
bool dfs(int pos, int tide, bool down) {
  if (pos > n) return true;
  if (v.find({pos, tide, down}) != v.end()) return false;
  v.insert({pos, tide, down});
  tide += down ? -1 : +1;
  if (tide == 0) down = false;
  if (tide == k) down = true;
  if (d[pos] + tide <= l && dfs(pos, tide, down)) return true;
  if (d[pos + 1] + tide <= l && dfs(pos + 1, tide, down)) return true;
  return false;
}
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    scanf("%d%d%d", &n, &k, &l);
    for (int i = 1; i <= n; ++i) scanf("%d", &d[i]);
    d[0] = d[n + 1] = -k;
    if (dfs(0, 0, false))
      puts("Yes");
    else
      puts("No");
    v.clear();
  }
  return 0;
}
