You are given two strings a and b. Now your task is to print all longest common sub-sequences in lexicographical order.
The first line of input contains an integer denoting the no of test cases T. Then T test case follow each test case contains 2 space separated strings a and b.
For each test case in a new line print the space separated sequences.
1<=length of strings a and b<=100
aaaa abaa baaa
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.