GNY07A - Mispelling

Misspelling is an art form that students seem to excel at. Write a program that removes the nth character from an input string.

Input

The first line of input contains a single integer N, (1 ≤ N ≤ 1000) which is the number of datasets that follow.

Each dataset consists of a single line of input containing M, a space, and a single word made up of uppercase letters only. M will be less than or equal to the length of the word. The length of the word is guaranteed to be less than or equal to 80.

Output

For each dataset, you should generate one line of output with the following values: The dataset number as a decimal integer (start counting at one), a space, and the misspelled word. The misspelled word is the input word with the indicated character deleted.

Example

Input:
4
4 MISSPELL
1 PROGRAMMING
7 CONTEST
3 BALLOON

Output:
1 MISPELL
2 ROGRAMMING
3 CONTES
4 BALOON

Added by:Marco Gallotta
Date:2008-03-11
Time limit:19.98s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ERL JS-RHINO NODEJS PERL6 VB.NET
Resource:ACM Greater New York Regionals 2007

hide comments
2012-06-02 16:52:14 Sai Praneeeth
for
1
1 A
output is a blank line i.e; '\n;
2012-05-24 16:32:30 Mayank Gupta
word length should be less than equal to 85. (as told by darky1)
2012-04-14 19:47:51 Darky
It says the length of the word<=80. Still I had to take 85 because of which I got two WAs!
2012-04-02 10:32:32 Arianto Wibowo
Can anybody tell me what's wrong with my program? code 6771441
2012-02-11 15:01:31 god_father
I AM GETTING RUN TIME error
2012-02-01 13:02:29 npsabari
getting WA.. what must be the output format for
2
1 A
3 THEEE

The numbering of the output should start at 1 or 2 in the above case?? and what should be the output for the '1 A'..
2011-12-19 04:37:38 Retaliation
wat would be output for
1
1 A
2011-12-02 17:14:37 R. Sibi
Getting WA even though the solution for the sample input is correct. getting it right for 1 A also !

Last edit: 2011-12-02 17:15:53
2011-10-30 13:29:02 saket diwakar
what's about the case
1
1 A ???
2011-08-17 19:55:41 Giovanni Botta
Oddly getting WA... is it possible to have more test cases?

Edit: Nevermind, I had messed up for the case:
1
1 A

Last edit: 2011-08-17 20:04:25
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.