Vasya interested bioinformatic he s go write article similar cyclic DNA sequence invent new method determine similarity cyclic sequenceslet assume string s t length n function hst define number position respective symbol s t Function hst define function Vasya distance ρst obtain string s apply leave circular shift time for example ρagccgt hagccgthagcgtchagctcg hgcacgthgcagtchgcatcg hcagcgthcaggtchcagtcg 1100111016vasya find string s length n internet now want count string t Vasya distance string s attain maximum possible value formally speak t satisfy equation Vasya try possible string find answer need help as answer large count number string modulo 1097