Longest Common Substring (April Fools Series)
Given two strings $S$ and $T$, please find the longest common substring of them. For your information, you could try to learn suffix automaton here, which could the problem in $O(|S| + |T|)$ time.
Input
The first line of the input contains the string $S$.
The second line of the input contains the string $T$.
Output
Please output The longest common substring.
Constraints
$1 \le |S|, |T| \le 10^6$
Scoring: Per Subtask
Authored by s17r28
Appeared in 中國香港九龍華仁書院電腦科主任李海峻老師精心調製之全校青少年信息學奧林匹克七月愚人節編程競賽二零二四