Lost Tree

hard
https://codeforces.com/problemset/problem/1534/D

Input Format

Check the link

Output Format

Check the link

Constraints

Check the link

Notice

Check the link

Example

Input
1
Output
1
Next
Manhattan Rectangle

Related Questions