import sys input = sys.stdin.readline T=input().strip() flag=0 for i in range(len(T)-3): if T[i]=="S" and T[i+1]=="K" and T[i+2]=="G": flag=1 if flag==1: print("No") else: print("Yes") ANS=[] for s in T: if s==".": if len(ANS)>=2 and ANS[-1]=="K" and ANS[-2]=="S": ANS.append("K") else: ANS.append("G") else: ANS.append(s) print("".join(ANS))