Wrote getLCS.