Statement
Statement language
You are given a sequence of length and a sequence of length .
Print any longest sequence that occurs contiguously in both and . In other words, the printed sequence must equal an interval of and an interval of .
Input
The input is given in the following format:
Each case is given in the following format:
Output
For each case, print the length of a longest common interval on one line. If , print its elements separated by spaces on the next line. If , print no elements.
If several answers exist, you may print any of them.
Constraints
- .
- .
- ().
- ().
- The sum of over all cases is at most .
- The sum of over all cases is at most .
Subtasks
Samples
Input
3
4 4
1 2 3 4
0 2 3 5
3 3
1 9 2
1 8 2
2 2
1 1
2 2
Output
2
2 3
1
1
0