Limak is a little bear who learns to draw. People usually start with houses, fences and flowers but why would bears do it? Limak lives in the forest and he decides to draw a tree.
Recall that
tree is a connected graph consisting of
n vertices and
n-1 edges.
Limak chose a tree with
n vertices. He has infinite strip of paper with two parallel rows of dots. Little bear wants to assign vertices of a tree to some
n distinct dots on a paper so that edges would intersect only at their endpoints − drawn tree must be planar. Below you can see one of correct drawings for the first sample test.

Is it possible for Limak to draw chosen tree?