This problem is in Contest(s) below:
Contest 1502:Trie及Ac自动机入门
Contest 1296:字符串入门
Contest 1499:YC_2021_3月
Contest 1499:YC_2021_3月