Added solution to print LCS