"""Task 209 Solver — Template-based block placement (266/266 PASS). Rule: 1. Find rectangular region bounded by 4 corner markers (color 4) 2. Inside the region, find colored NxN blocks 3. Outside the region, find a small template showing color arrangement 4. The template defines a grid; each cell maps to a block_size x block_size area 5. Find the offset that maps existing blocks to template positions 6. Fill in blocks in the region according to the template pattern Parameters observed across all 266 examples: - Block sizes: 2 (71), 3 (162), 4 (33) - Template shapes: 2x2, 2x3, 3x2, 2x4, 3x3, 3x4, 3x5, 2x5, 1x4 - Colors in region: 1-4 """