Domino

hard
https://codeforces.com/problemset/problem/1551/D1

Input Format

Check the link

Output Format

Check the link

Constraints

Check the link

Example

Input

        
Output

        
Previous
Nice Garland
Next
Equal Rectangles

Related Questions