AGPREFX - Agent prefix

no tags 

You have been recruited by a top secret intelligence organization. Now, finally, your dream of becoming a secret agent has come true. This agency is so secret that no one even knows its name... and it must stay that way!

Your first task is to to eliminate the name of your agency from the text messages that agents of other agencies exchange. Unfortunately, not even you can know. To do this someone will tell you the name and where it is in the text. Your job is to replace that word with the word LUISS.

Good luck Agent Prefix!

Inputs

Input will come to you over three lines. The first will contain the name of the agency to be eliminated, the second the first index of the string in which to replace the word, the third the message

Outputs

The output should be the string in the third line with the word in the first line replaced with LUISS

Example

Input:
agenzia
7
Questa agenzia domina il mondo

Output:
Questa LUISS domina il mondo

hide comments
pavansss91: 2020-03-19 09:39:36

If anyone is confused, the index given is a random index of the string which is part of the word that needs to be replaced.

partha2717: 2019-07-07 18:12:34

i/O translated:-
Input-
agency
7
This agency dominates the world

Output-
This LUISS dominates the world

hodobox: 2019-01-02 19:58:44

I agree - super basic task, only open to Py 2.7, statement is not even in English... not a good problem for classical set.

nadstratosfer: 2018-03-19 17:48:35

Please move to Basics and open to other languages.

Also correct "primo indice" to "indice" in the statement, as replacing any other instance of the substring results in WA.

wisfaq: 2018-03-19 13:51:28

Google translate:
You have been recruited by a very secret organization of intellingence. Now, finally, your dream of becoming a secret agent has become a reality.
This agency is so secret that nobody even knows what it's called ... and so it must stay!
Your first task is to eliminate, from text messages that agents of other agencies exchange, the name of your agency.
Unfortunately, you can not even know it. To do this, someone will tell you the name and where it is in the text. Your task is to replace that word, the word LUISS.
Good luck Agent Prefix!

Input

The input will come to you on three lines. The first will contain the name of the agency to be deleted, the second the first index of the string to replace the word, the third the message

Output

The output must be the string in the third line with the word of the first line replaced with LUISS


Added by:Donatella Firmani
Date:2018-03-18
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:PYTHON