By Neilor Tonin, URI Brazil
Mariazinha created an exercise for her sisters Paula and Marta: she distributes a text and asks both to correct this text, knowing that only the OBI and URI words may be written incorrectly, and the error can be only in the last letter.
Your task here is automatize this process, creating a program to make the correction of the texts distributed by Mariazinha in order to check the corrections of her sisters without much work.
Note that if "OB" or "UR" were part of a larger word (for example, "OBOS"), it should not be altered.
The input contains two lines. The first line contain a integer number N (1 < N < 10000) that indicates the amount of text words. The second line contains these text words, each one with up to 20 characters ('A'-'Z'), inclusive, or at least, one letter ('A'-'Z').
Your program must correct the text distributed by Mariazinha, according to the criteria above defined.
Input Samples | Output Samples |
2 |
OBI URI |
3 |
EURO AVOID OBITS |
10 |
URI URI URI URI UROS IBO OBI OBAS OBES OBI |