Made print function return lcs on one line