#include using namespace std; struct Trie{ struct Node { std::array child; int sz, hik; Node(void) :sz(0), hik(0) { child.fill(-1); } const int& operator[](int k) const { return child[k]; } int& operator[](int k) { return child[k]; } }; int num; vector tree; Node& operator[](int k) { return tree[k]; } Trie() : num(0) { tree.push_back(Node()); } void insert(const string &s){ int cur = 0; for(auto c: s){ tree[cur].sz++; if(tree[cur][c - 'a'] == -1){ tree[cur][c - 'a'] = ++num; tree.push_back(Node()); } cur = tree[cur][c - 'a']; } tree[cur].sz++; tree[cur].hik++; } int size(const string &s){ int cur = 0; for(auto c:s){ if(tree[cur][c - 'a']==-1)return 0; cur = tree[cur][c - 'a']; } return tree[cur].sz; } int size(int node_num){ return (node_num==-1?0:tree[node_num].sz); } int search(string &s){ int cur=0,ans=0; array t; t.fill(0); for(auto c:s)t[c-'a']++; for(auto c:s){ for(int j=0;j<26;j++){ if(t[j])ans+=size(tree[cur][j]); } if(tree[cur][c-'a']==-1)return ans; cur=tree[cur][c-'a']; t[c-'a']--; } return ans; } }; int main() { ios::sync_with_stdio(false); cin.tie(0); int n, m; cin >> n >> m; Trie trie; for(int i = 0; i < n; i++){ string s; cin >> s; trie.insert(s); } string ans; int th = n - m; // th以下ならOK auto dfs = [&](auto dfs, int v, int ofs) -> void { if(ofs + trie[v].sz <= th){ cout << "Yes\n"; cout << ans << '\n'; exit(0); return; } ofs += trie[v].hik; if(ofs > th) return; for(int i = 0; i < 26; i++){ if(trie[v][i] == -1) continue; ans += 'a' + i; dfs(dfs, trie[v][i], ofs); ans.pop_back(); } }; dfs(dfs, 0, 0); cout << "No\n"; }