Matches
Matches are not toys for children!
Fire Safety Briefing
In the game "Fort Boyard," the team of scouts might face the following challenge: there are n matches on the table, and you need to remove exactly k of them so that the remaining configuration forms exactly m squares.
Input
The first line of the input contains the integers n, k, and m (0 < k < n < 25, 0 ≤ m ≤ 50). Each of the next n lines provides a description of a match with four integers: x_{i,1}, y_{i,1}, x_{i,2}, y_{i,2}, which represent the coordinates of the match's endpoints. Each match has a length of 1. No two matches overlap. The coordinates do not exceed 100 in absolute value.
Output
If it is impossible to achieve exactly m squares, output a single number -1. Otherwise, output k numbers, which are the indices of the matches that need to be removed. Matches are numbered starting from one. If there are multiple solutions, you may output any one of them.