Password

hard
https://codeforces.com/contest/127/problem/D

Input Format

Check link in description

Output Format

Check link in description

Constraints

Check link in description

Example

Input
fixprefixsuffix
Output
fix
Previous
Rabin Karp Pattern Find (spoj)
Next
Good Substrings

Related Questions