SP177 ABWORDS - AB-words
Description
Every sequence of small letters a and b (also the empty sequence) is called an ab-word. If _X_ = \[_x_ $ _{1} $ , ..., _x_ _$ _{n} $_ \] is an ab-word and _i_, _j_ are integers such that 1
Input Format
The number of test cases _t_ is in the first line of input, then _t_ test cases follow separated by an empty line.
In the first line of a test case there is a number _n_ of elements of the set _S_, 1
Output Format
For each test case your program should output one line with one integer - the level of diversity of _S_.