Walking Between Houses

easy
https://codeforces.com/problemset/problem/1015/D

Input Format

Check the link

Output Format

Check the link

Constraints

Check the link

Notice

Check the link

Example

Input

        
Output

        
Previous
Bear & Forgotten Tree 3
Next
Sum In The Tree

Related Questions