There are a bunch of trolls hiding in the back fence (an infestation of reddit junkies you could say). Your mission is to snoop around and see how many there are.
The first line will contain an integer N, denoting the number of test cases. For each case there will be a line containing a string of characters, ‘^’ representing the fence and ‘o’ for each individual troll. There will never be any other characters aside from ‘^’ or ‘o’.
For each test case, output a line containing the number of trolls.
3 ^ooooo^o^o^oo^ ooo^oo^oo^ ^^^^
9 7 0