pushing right adjacent element for index ' k '
if ( k + 1 <= s . size ( ) - 1 and ! edge [ s [ k ] - 97 ] [ s [ k + 1 ] - 97 ] ) gr [ s [ k ] - 97 ] . push_back ( s [ k + 1 ] - 97 ) , edge [ s [ k ] - 97 ] [ s [ k + 1 ] - 97 ] = 1 ; }