Add To Neighbour And Remove

easy
https://codeforces.com/contest/1462/problem/D

Input Format

Check the link

Output Format

Check the link

Constraints

Check the link

Notice

Check the link

Example

Input

        
Output

        
Previous
Sasha And Magnetic Machines
Next
Just Arrange The Icons

Related Questions