ASCII Art#6291

ASCII Art

2 seconds
64 megabytes
Very hard

ASCII art is an art of creating pictures with a grid of ASCII characters. There are many styles of ASCII art, but we are interested in the most primitive one, where just an overall character density is used to represent differently shaded areas of the picture.

You should write a proof-of-concept program that renders a filled closed polygon with a rectangular grid of ASCII characters. The whole process is explained in detail below.

Let be a Cartesian coordinate system with pointing to the right and pointing up. Drawing canvas is bounded with – rectangle. Pixels on the canvas are –(x+1, y+1) squares where and are integers such that 0 \le x < w and 0 \le y < h. A filled closed polygon without self-intersections and self-touchings (but not necessarily convex) is drawn on the canvas. Pixels of the canvas become partially filled during the process. Each pixel is represented by an ASCII character depending on the percentage of its filled area according to the following table:

The resulting ASCII characters for all pixels are printed top-to-bottom and left-to-right to get a visual representation of the drawing.

Input

The first line of the input contains integers , , and (3 \le n \le 100, 1 \le w, h \le 100) — number of vertices in the polygon, width and height of the canvas respectively. The following lines contain coordinates of the polygon vertices in clockwise order. Point is described by two integers x_i and y_i (0 \le x_i \le w, 0 \le y_i \le h).

Output

Write to the output lines with ASCII characters each that represent ASCII art drawing of the given polygon.

Examples

Example 1

Loading
Loading