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
2016-05-31 19:37:46
AC. Very Simple. :-) . use string datatype. and functions for flawless performance.
2016-04-14 15:50:38
How can I input vars like this: "Each dataset consists of a single line of input containing M, a space, and a single word". I am using php, but this space is killing me. My actual way: "fscanf($stdin,"%d%s", $m, $word);"
2016-03-04 08:20:53
if u r using string in cpp then it will not give u ac.....so move on char
2015-08-23 08:06:02 Ravi Chandra
Easy Short Simple Code
2015-07-13 04:40:08
DEAD EASY :P
green in 1 go 0.0s
output format : case<space>string
2015-06-16 22:23:45 Parth
green in 1 go.............so easy..:)
2015-05-31 15:22:53 Krishna Chouhan
i solved this question but its not shown on my account page under "solved problems".
anybody?
2014-11-09 19:26:54 lucky
too easy...
got AC in one go
2014-07-26 09:37:05 kkkkkk
It will work if size is 81,1 more than 80 because 1 space is reserved for null.
2014-05-25 18:44:00 Shanks
easy and the code is short aswell :D
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.