Build the smallest
Submissions: 820   Accuracy:

30.95%

  Difficulty: Medium   Marks: 4

Given a number N and string S of digits denoting a positive integer [ N < sizeof(S) ] , build the lowest number possible by removing N digits from S, without changing their order.

 

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 a positive integer N.
The second line of each test case contains a string of digits denoting a positive integer S.

NOTE: N should be less than length of (S).


Output
Print out the smallest number possible.


Constraints
1 <= T <= 100
0 <   S <= 30
0 <   N <= 10 

 

Examples 

Input
3
4
1234567
3
3435335
2
1034

Output
123
3333
03

** For More Input/Output Examples Use 'Expected Output' option **

Author: Rohan Malhotra


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.