import sys input = sys.stdin.readline N,M=list(map(int,input().split())) # Trie木(Next_node_idを一次元化しておこう) Charcaters=26 # 文字数 Next_node_id=[-1]*Charcaters # "A"~"Z"それぞれについて、対応する次のノードのid Parent_id=[-1] # 親ノード Depth=[0] # Trieのノードの深さ Count=[0] # Trieのノードの重複度 Count2=[0] Nodes_id=1 # 以下、標準入力で与えられたN個の文字列を追加する実装 for i in range(N): S=input().strip() L=len(S) NOW=0 for s in S: NEXT=ord(s)-97 if Next_node_id[NOW*Charcaters+NEXT]==-1: # Nodeを追加する場合 Next_node_id[NOW*Charcaters+NEXT]=Nodes_id Next_node_id+=[-1]*Charcaters Parent_id.append(NOW) Depth.append(Depth[NOW]+1) Count.append(0) Count2.append(1) NOW=Nodes_id Nodes_id+=1 else: # 追加しない場合 NOW=Next_node_id[NOW*Charcaters+NEXT] Count2[NOW]+=1 Count[NOW]+=1 # 終端に印を付ける NOW=0 IND=[0]*(len(Count)+10) ANS=[] shuutan=0 while True: #print(NOW,ANS) if IND[NOW]==26: NOW=Parent_id[NOW] if NOW==-1: break ANS.pop() continue if Next_node_id[NOW*Charcaters+IND[NOW]]==-1: ANS.append(IND[NOW]) break else: IND[NOW]+=1 ANS.append(IND[NOW]-1) NOW=Next_node_id[NOW*Charcaters+IND[NOW]-1] shuutan+=Count[NOW] if shuutan>N-M: shuutan-=Count[NOW] NOW=Parent_id[NOW] ANS.pop() continue if Count2[NOW]<=N-M: break else: pass if ANS==[]: print("No") else: print("Yes") ANS2=[] for ans in ANS: ANS2.append(chr(ans+97)) print("".join(ANS2))