### Statement↵
Given $n$ strings. Find the string $s$ with minimum length such that each of $n$ given strings is a substring of $s$.↵
↵
### Constraint↵
$n \le 50$↵
↵
Every of $n$ strings has length not exceed $10$↵
↵
### Example:↵
#### Input:↵
↵
~~~~~↵
3↵
ab↵
ba↵
abb↵
~~~~~↵
↵
#### Output:↵
↵
~~~~~↵
abba↵
~~~~~↵
↵
This problem is hard for me. Can you give me a hint? Thank you in advance.
Given $n$ strings. Find the string $s$ with minimum length such that each of $n$ given strings is a substring of $s$.↵
↵
### Constraint↵
$n \le 50$↵
↵
Every of $n$ strings has length not exceed $10$↵
↵
### Example:↵
#### Input:↵
↵
~~~~~↵
3↵
ab↵
ba↵
abb↵
~~~~~↵
↵
#### Output:↵
↵
~~~~~↵
abba↵
~~~~~↵
↵
This problem is hard for me. Can you give me a hint? Thank you in advance.