Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ACM-ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

This round has an unusual addition to the rules. For each problem you must use distinct language. Thus, if you have a submission that has passed at least one test or is being tested at the moment, then for this task you can use only this language and can not use it for other tasks. More details can be read by the link. Different implementations of the same language are considered to be the same language (for example, in C++ you can only solve one problem, regardless of the exact chosen compiler).

No tags yet

No tag edit access

D. Choose Place

time limit per test

1 secondmemory limit per test

256 megabytesinput

standard inputoutput

standard outputA classroom in a school has six rows with 3 desks in each row. Two people can use the same desk: one sitting on the left and one sitting on the right.

Some places are already occupied, and some places are vacant. Petya has just entered the class and wants to occupy the most convenient place. The conveniences of the places are shown on the picture:

Here, the desks in the top row are the closest to the blackboard, while the desks in the bottom row are the furthest from the blackboard.

You are given a plan of the class, where '*' denotes an occupied place, '.' denotes a vacant place, and the aisles are denoted by '-'.

Find any of the most convenient vacant places for Petya.

Input

The input consists of 6 lines. Each line describes one row of desks, starting from the closest to the blackboard. Each line is given in the following format: two characters, each is '*' or '.' — the description of the left desk in the current row; a character '-' — the aisle; two characters, each is '*' or '.' — the description of the center desk in the current row; a character '-' — the aisle; two characters, each is '*' or '.' — the description of the right desk in the current row. So, the length of each of the six lines is 8.

It is guaranteed that there is at least one vacant place in the classroom.

Output

Print the plan of the classroom after Petya takes one of the most convenient for him places. Mark this place with the letter 'P'. There should be exactly one letter 'P' in the plan. Petya can only take a vacant place. In all other places the output should coincide with the input.

If there are multiple answers, print any.

Examples

Input

..-**-..

..-**-..

..-..-..

..-..-..

..-..-..

..-..-..

Output

..-**-..

..-**-..

..-..-..

..-P.-..

..-..-..

..-..-..

Input

**-**-**

**-**-**

..-**-.*

**-**-**

..-..-..

..-**-..

Output

**-**-**

**-**-**

..-**-.*

**-**-**

..-P.-..

..-**-..

Input

**-**-*.

*.-*.-**

**-**-**

**-**-**

..-..-..

..-**-..

Output

**-**-*.

*.-*P-**

**-**-**

**-**-**

..-..-..

..-**-..

Note

In the first example the maximum convenience is 3.

In the second example the maximum convenience is 2.

In the third example the maximum convenience is 4.

Codeforces (c) Copyright 2010-2018 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Jun/24/2018 10:07:08 (d2).

Desktop version, switch to mobile version.

User lists

Name |
---|