Problem Description

Read two strings s and p. Output all starting indices (0-based) where p occurs in s. If none, output -1.

Input Format

Two lines: s then p.

Output Format

Indices in one line space-separated or -1.

Sample Test Case

Input:
aaaaa aa
Output:
0 1 2 3

Constraints

Total length

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next