Solution to the edit distance lab