introducing solution to LCSM, includes effective pairwise LCS algorithm