Given a lowercase word, print all $0$-based indices where g appears, in ascending order, space-separated. If there is no g, print -1.
Input
One lowercase word of length $1$ to $100$.
Output
Print the indices of g, or -1 if none.
Example 1
Input
algorithm
Output
2
Example 2
Input
Output
0 3
Example 3
Input
apple
Output
-1
Discussion
Threads about this problem. Spoilers are collapsed; wrap hints in
||double bars||.No discussion yet. Start a thread if something here needs explaining.