Given a lowercase word (guaranteed to contain at least one g), print all $0$-based indices where g appears, in ascending order, space-separated.
Input
One lowercase word of length $1$ to $100$ containing at least one g.
Output
Print the indices of g, space-separated.
Example 1
Input
algorithm
Output
2
Example 2
Input
Output
0 3
Discussion
Threads about this problem. Spoilers are collapsed; wrap hints in
||double bars||.No discussion yet. Start a thread if something here needs explaining.