POJ 1458 Common Subsequence: Solved