This page is still under construction.

Parts of this page are still being built. What you see may change.

Hongik Dance Party

Time limit1sMemory limit1024 MB

Summary
Given five lines of characters forming a 5-column-wide photograph, swap the two characters that mark the Ready to Leap and Leaping states, and print the resulting lines.
Level

Easy2 of 10

Topics
Implementation, String, Simulation, Array
Solved
No attempts yet

Problem

Ten years ago, a dance party was held for the students of Hongik University.

Ready to LeapLeapingSeated
1.o.
2ow.
3mlo
4lnL
5n.n

As shown above, the dance party has three kinds of students.

The students stand in a single line, packed together with no empty space between them. On the next turn, a student who is Ready to Leap becomes Leaping, and a student who is Leaping becomes Ready to Leap. A student who is Seated does not change.

You captured the scene of the dance party in a single photograph.

Now, ten years later, having graduated and become a member of society, you found the photograph of the dance party while cleaning out your belongings. That single worn photograph was enough to immerse you in memories of the days when you were busy being worn down by everyday life.

To recall those days, infer the next turn's scene from the given photograph.

Input

The photograph of the dance party is given as 55 lines of strings.

The maximum length of each line is 10 00010\,000 characters, and all lines have the same length.

Each column is one of Ready to Leap, Leaping, and Seated.

Output

Print the next turn's scene of the dance party photograph given as input, as 55 lines of strings.

Examples3

  1. Example 1

    Input
    .o.
    ow.
    mlo
    lnL
    n.n
    
    Expected output
    o..
    wo.
    lmo
    nlL
    .nn
    
  2. Example 2

    Input
    .
    o
    m
    l
    n
    
    Expected output
    o
    w
    l
    n
    .
    
  3. Example 3

    Input
    .....
    oo.oo
    mmomm
    llLll
    nnnnn
    
    Expected output
    oo.oo
    ww.ww
    lloll
    nnLnn
    ..n..