{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eSasha wanted to make Ira a very unusual birthday gift. Romantic message posted with solved problems, on the most popular Ukrainian online judge. Problems on the site are in the form of a rectangular table, solved problems are highlighted in a pleasant green. This has suggested the idea to light in the table only those cells that would form a desired image or inscription...\u003c/p\u003e\n\n\u003cp\u003e\u003cimg src\u003d\"https://static.e-olymp.com/content/4c/4c23fd3a6155444997e8341da34bf469c6dd1b13.jpg\" /\u003e\u003c/p\u003e\n\n\u003cp\u003eEven if the shape of the message is strictly defi\u001cned, its position in the table can be controlled. Of course, on the location of the signs depends set of tasks to be solved. So Sasha has assigned to each task a score - a integer from \u003cstrong\u003e0\u003c/strong\u003e to \u003cstrong\u003e9\u003c/strong\u003e, and decided to location in such way, so that the sum of marks would be maximial. Text can be placed in a table anywhere, with only one limitation: inscription must entirely lie in the table.\u003c/p\u003e\n\n\u003cp\u003e\u003ch2\u003eInput\u003c/h2\u003e\u003c/p\u003e\n\n\u003cp\u003eFirst line of the input fi\u001cle contain two integers \u003cstrong\u003eR\u003c/strong\u003e and \u003cstrong\u003eC\u003c/strong\u003e (\u003cstrong\u003e1\u003c/strong\u003e ≤ \u003cstrong\u003eR\u003c/strong\u003e, \u003cstrong\u003eC\u003c/strong\u003e ≤ \u003cstrong\u003e800\u003c/strong\u003e) --- number of rows and columns in the table, respectively. In next \u003cstrong\u003eR\u003c/strong\u003e lines map of the problems is described. Each line has exactly \u003cstrong\u003eC\u003c/strong\u003e digits - score for corresponding tasks. The score for the task is measured by the integer from \u003cstrong\u003e0\u003c/strong\u003e to \u003cstrong\u003e9\u003c/strong\u003e. The next line gives two numbers \u003cstrong\u003eH\u003c/strong\u003e (\u003cstrong\u003e1\u003c/strong\u003e ≤ \u003cstrong\u003eH\u003c/strong\u003e ≤ \u003cstrong\u003eR\u003c/strong\u003e) and \u003cstrong\u003eW\u003c/strong\u003e (\u003cstrong\u003e1\u003c/strong\u003e ≤ \u003cstrong\u003eW\u003c/strong\u003e ≤ \u003cstrong\u003eC\u003c/strong\u003e) --- height and width of the inscription, respectively. In next \u003cstrong\u003eH\u003c/strong\u003e lines template of the inscription is given. Each line consists of \u003cstrong\u003eW\u003c/strong\u003e characters: ’#’ means that the problem needs to be solved, ’.’ means that the problem should not be solved.\u003c/p\u003e\n\n\u003cp\u003e\u003ch2\u003eOutput\u003c/h2\u003e\u003c/p\u003e\n\n\u003cp\u003ePrint the maximum sum of scores for solved problems.\u003c/p\u003e\n\n"}},{"title":"Example","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e22 18\n000000000001000000\n003001000000000000\n000000000000000003\n020000000010000000\n090000000901000100\n300400001911323500\n000000000000000000\n000000000000000000\n000001000001000049\n020100113210100000\n200000006220004100\n600009000217100009\n000001000031004210\n020101600100000190\n110001002000000000\n000092096071021990\n000094000120010100\n201003007430040300\n100000010000100000\n101040008000020001\n404000000040043200\n000000010000001000\n17 18\n###...#...........\n.#....#...........\n.#....#..#..#.#.##\n.#....#.#.#.#.#.#.\n.#....#.#.#.#.#.##\n.#....#.#.#..#..#.\n###...#..#...#..##\n..................\n..................\n..................\n..###.............\n...#..............\n...#..#.##.##.....\n...#...#.#...#....\n...#...#....##....\n...#...#...#.#....\n..###..#...##.#...\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e69\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}