Problem Description

Given s and p (lowercase), print all start indices where an anagram of p begins.

Input Format

Two lines: s then p.

Output Format

One line indices (space-separated).

Sample Test Case

Input:
cbaebabacd abc
Output:
0 6

Constraints

|s|,|p|

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next