Bear & Forgotten Tree 3

easy
https://codeforces.com/problemset/problem/639/B

Input Format

Check the link

Output Format

Check the link

Constraints

Check the link

Notice

Check the link

Example

Input

        
Output

        
Previous
Sorting Railway Cars
Next
Walking Between Houses

Related Questions