{"raw_statement":[{"iden":"problem statement","content":"There is an $N\\times N$ grid with horizontal rows and vertical columns, where all squares are initially painted white. Let $(i,j)$ denote the square at the $i$\\-th row and $j$\\-th column.\nTakahashi has integers $A$ and $B$, which are between $1$ and $N$ (inclusive). He will do the following operations.\n\n*   For every integer $k$ such that $\\max(1-A,1-B)\\leq k\\leq \\min(N-A,N-B)$, paint $(A+k,B+k)$ black.\n*   For every integer $k$ such that $\\max(1-A,B-N)\\leq k\\leq \\min(N-A,B-1)$, paint $(A+k,B-k)$ black.\n\nIn the grid after these operations, find the color of each square $(i,j)$ such that $P\\leq i\\leq Q$ and $R\\leq j\\leq S$."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 10^{18}$\n*   $1 \\leq A \\leq N$\n*   $1 \\leq B \\leq N$\n*   $1 \\leq P \\leq Q \\leq N$\n*   $1 \\leq R \\leq S \\leq N$\n*   $(Q-P+1)\\times(S-R+1)\\leq 3\\times 10^5$\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$ $A$ $B$\n$P$ $Q$ $R$ $S$"},{"iden":"sample input 1","content":"5 3 2\n1 5 1 5"},{"iden":"sample output 1","content":"...#.\n#.#..\n.#...\n#.#..\n...#.\n\nThe first operation paints the four squares $(2,1)$, $(3,2)$, $(4,3)$, $(5,4)$ black, and the second paints the four squares $(4,1)$, $(3,2)$, $(2,3)$, $(1,4)$ black.  \nThus, the above output should be printed, since $P=1$, $Q=5$, $R=1$, $S=5$."},{"iden":"sample input 2","content":"5 3 3\n4 5 2 5"},{"iden":"sample output 2","content":"#.#.\n...#\n\nThe operations paint the nine squares $(1,1)$, $(1,5)$, $(2,2)$, $(2,4)$, $(3,3)$, $(4,2)$, $(4,4)$, $(5,1)$, $(5,5)$.  \nThus, the above output should be printed, since $P=4$, $Q=5$, $R=2$, $S=5$."},{"iden":"sample input 3","content":"1000000000000000000 999999999999999999 999999999999999999\n999999999999999998 1000000000000000000 999999999999999998 1000000000000000000"},{"iden":"sample output 3","content":"#.#\n.#.\n#.#\n\nNote that the input may not fit into a $32$\\-bit integer type."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}