#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
using namespace std;
int res = 0;//最长长度(最后要输出的答案)
int n;//储存字符串个数
vector<int>num;//记录每个字符串的使用次数
vector<string>all_s;//保存所有字符串
int search(string s,int xb)//查找最小重叠长度
{
int num = 0;
int f_len = s.length()-