Capitalization
InterviewTime limit2sMemory limit512 MB
Replace every occurrence of the substring "joi" in a lowercase string with "JOI" and print the result.
- Level
Easy2 of 10
- Topics
- String, Implementation
- Solved
- No attempts yet
Problem
JOI found a string S of length N. Every character in S is a lowercase English letter.
JOI decided to search the string from the beginning for every occurrence of his name joi appearing consecutively, and each time he found joi, he decided to replace it with the uppercase JOI for emphasis.
Given a string S, write a program that outputs the string obtained by replacing every joi in S with JOI.
Input
The input is given from standard input in the following format.
N
S
Output
Print on one line the string obtained by replacing every joi in S with JOI.
Constraints
3 ≦ N ≦ 100.Sis a string of lengthN.Sconsists of lowercase English letters.