#include <bits/stdc++.h>

using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
#ifdef LOCAL
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
#endif
    int T;
    cin >> T;
    int n, m;
    cin >> n >> m;
    vector<int> a(n);
    string s;
    cin >> s;
    bool ok = true;
    for(int i = 1; i < n; ++i) {
        ok &= (a[i] == a[i-1]);
    }
    sort(a.begin(),a.end());
    a.erase(unique(a.begin(),a.end()), a.end());    
    if(a.size() == m && ok) {
        cout << "No\n";
    } else {
        cout << "Yes\n";
    }
    return 0;
}