Tavas strange creature usually zzz come people mouth sleep string s length n come Tavas mouth instead Today Tavas fall asleep Malekas place while sleep Malekas little process s Malekas favorite string p he determine position x1x2xk p match s more formally xi 1ik condition sxisxi1 sxip1p fullfilledThen Malekas write subsequence x1x2 xk possibly do not write piece paper here sequence b subsequence sequence turn b remove element maybe allafter Tavas wake Malekas tell he could not remember string s know p s contain lowercase english letter subsequence write piece paperTavas wonder number possible value s he ask saddas was not smart solve so Tavas ask calculate number himanswer large Tavas want print answer modulo 1097