CF212B Polycarpus is Looking for Good Substrings

Description

We'll call string $ s[a,b]=s_{a}s_{a+1}...\ s_{b} $ $ (1

Input Format

The first line contains a non-empty string $ s $ $ (1

Output Format

Print $ m $ integers — the $ i $ -th integer must equal $ r(C_{i},s) $ .