basic m*n lcs with tests