Problem H. Hexes in viewport

Author:A. Klenin   Time limit:1 sec
Input file:input.txt   Memory limit:256 Mb
Output file:output.txt  

Statement

A game development company has started prototyping a new game, which is played on a field based on a hexagonal grid. The first task is to display a part of the grid in the player's viewport. To speed up the prototyping phase, it was decided to use text-based representation instead of graphics.

The hexagonal grid is composed of nearly perfect hexagons with the side of N characters. In every hexagon, the top and the bottom sides are composed of N "_" characters (ASCII 95), the right-top and the left-bottom sides are composed of N "\" characters (ASCII 92), the left-top and the right-bottom sides are composed of N "/" characters (ASCII 47). All other characters of the field are "." (ASCII 46).

The grid is assumed to be infinite, with the position (0; 0) corresponding to the leftmost character of the top side of a hexagon. The player's viewport is a rectangle displaying some part of the field.

You program must, given the coordinates x, y of the top left corner of the viewport and w, h — the viewport width and height, output the content of the viewport.

Input file format

Input file contains integers N x y w h.

Output file format

Output file must contain h lines of w characters each — the viewport content.

Constraints

1 ≤ N ≤ 100, 0 ≤ x, y ≤ 109, 1 ≤ w, h ≤ 100

Sample tests

No. Input file (input.txt) Output file (output.txt)
1
3 0 2 33 10
....\...../.....\...../.....\....
.....\___/.......\___/.......\___
...../...\......./...\......./...
..../.....\...../.....\...../....
___/.......\___/.......\___/.....
...\......./...\......./...\.....
....\...../.....\...../.....\....
.....\___/.......\___/.......\___
...../...\......./...\......./...
..../.....\...../.....\...../....

0.066s 0.011s 13