# Trolls

## Introduction

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.

Input:
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’.

Output:
For each test case, output a line containing the number of trolls.

## Sample Input

3
^ooooo^o^o^oo^
ooo^oo^oo^
^^^^


## Sample Output

9
7
0