Suppose I want to find the longest subsequence such that first half of subsequence is same as second half of it.

For example: In a string abkcjadfbck , result is abcabc as abc is repeated in first and second half of it. In a stirng aaa, result is aa.