Easy

28.33%

Given a string containing characters as integers only. We need to delete all character of this string in a minimum number of steps where in one step we can delete the substring which is a palindrome. After deleting a substring remaining parts are concatenated.

**Input:**

The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. The first line of each test case contains an integer N denoting the length of the string.

The second line of each test case contains the string consisting of only integer characters.

**Output:**

Count the minimum number of steps to delete the whole string and output the answer in a new line.

**Constraints:**

1<= T <=100

1<= N <=1000

**Example:**

**Input:**

1

7

```
2553432
```

**Output:**

2