Triangulation
A polygon with N vertices is provided. This polygon has no self-intersections or self-tangencies. Your task is to triangulate the polygon, meaning you need to divide it into exactly N-2 triangles, ensuring the following conditions are satisfied:
The vertices of each triangle must be selected from the vertices of the original polygon.
Each triangle must be non-degenerate.
Each triangle must be completely contained within the original polygon.
The interior regions of any two triangles must not overlap.
Input
The first line contains the integer N (3 ≤ N ≤ 5000), representing the number of vertices of the polygon. The next N lines each contain two integers: x_i, y_i (-10000 ≤ x_i, y_{i} ≤ 10000), which are the coordinates of the polygon's vertices listed in counterclockwise order. It is guaranteed that all points are distinct. Furthermore, any pair of sides shares exactly one common point if they are adjacent, and none otherwise.
Output
Output N-2 lines, each containing three distinct integers: a_i, b_i, and c_i (1 ≤ a_i, b_i, c_{i} ≤ N). These integers are the indices of the vertices of the original polygon that form the i-th triangle. The vertices of the polygon are numbered starting from 1 in the order they appear in the input.
If multiple triangulation solutions exist, any valid one can be provided. Triangles can be listed in any order, and the indices of the vertices within each triangle can also be in any order.