Problem A
Getting Wood

Steve, Alex, and Kai find themselves in the world of Minecraft with nothing but the clothes on their backs. Night fast approaches, and they have much to do to prepare themselves. They decide to split up to gather basic resources.
Steve’s first task is to find wood to make tools and build a shelter. To do this, he must find a tree. Any type of tree will do, but he must find one quickly to have time to do his other tasks as well.
Input
The input is a single line containing the string $s$, describing what Steve sees as he looks around.
You are given that $1 \le |s| \le 100$ (the length of $s$ is at most 100) and that $s$ consists only of lower-case letters, underscores, and spaces.
Output
Output the zero-based index of the first substring "tree" in $s$. If "tree" does not occur in $s$, output "no trees here" to tell Steve he needs to go somewhere else to find wood.
Sample Input 1 | Sample Output 1 |
---|---|
dirt dirt grass stone oak_tree villager |
26 |
Sample Input 2 | Sample Output 2 |
---|---|
deepslate iron_ore deepslate diamonds lava |
no trees here |