Generic NeedlemanWunsch