1.1 Pooja's Greenhouse: Growing Success ðŸŒ±

Score: 10pts

Time Limit: 5.00 sec

Pooja is a young botanist working in a greenhouse where she has 26 different types of plants, labelled from 'A' to 'Z'. Each type of plant requires a certain amount of care time to fully grow:

Plant 'A' requires 1 minute of care,

Plant 'B' requires 2 minutes of care,

Plant 'C' requires 3 minutes of care,

and so on, up to Plant 'Z', which requires 26 minutes of care.

After a busy day at the greenhouse, you discover Poojaâ€™s activity logâ€”a string of letters where the i-th term of the string tells you which plant Pooja was taking care of during the i-th minute of her day.

To fully grow a plant, Pooja needs to spend the required number of minutes caring for that plant. However, she might continue to care for a plant even after it has fully grown, or she might switch between different plants throughout her day.

Given Poojaâ€™s activity log, determine how many different types of plants she successfully grew by the end of the day.

Plant 'A' requires 1 minute of care,

Plant 'B' requires 2 minutes of care,

Plant 'C' requires 3 minutes of care,

and so on, up to Plant 'Z', which requires 26 minutes of care.

After a busy day at the greenhouse, you discover Poojaâ€™s activity logâ€”a string of letters where the i-th term of the string tells you which plant Pooja was taking care of during the i-th minute of her day.

To fully grow a plant, Pooja needs to spend the required number of minutes caring for that plant. However, she might continue to care for a plant even after it has fully grown, or she might switch between different plants throughout her day.

Given Poojaâ€™s activity log, determine how many different types of plants she successfully grew by the end of the day.

Constraints

t(1â‰¤tâ‰¤100)

n(1â‰¤nâ‰¤500)

n(1â‰¤nâ‰¤500)

Input Format

The first line contains a single integer t â€” the number of testcases.

The first line of each testcase contains a single integer n â€”the total duration of Poojaâ€™s workday spent on looking after the plants in minutes

The second line contains a string of length exactly n, consisting only of uppercase Latin letters, â€” Pooja's activity log.

The first line of each testcase contains a single integer n â€”the total duration of Poojaâ€™s workday spent on looking after the plants in minutes

The second line contains a string of length exactly n, consisting only of uppercase Latin letters, â€” Pooja's activity log.

Output Format

For each test case, print a single integer â€” the number of distinct types of plants Pooja successfully grew by the end of the day.

Example 1

Input:

3

6

ACBCBC

7

AAAAFPC

22

FEADBBDFFEDFFFDHHHADCC

Output:

3

1

4

Explanation:

It is self explanatory

3

6

ACBCBC

7

AAAAFPC

22

FEADBBDFFEDFFFDHHHADCC

Output:

3

1

4

Explanation:

It is self explanatory