We took a non-equilateral acute-angled triangle and marked $4$ wonderful points in it: the centers of the inscribed and circumscribed circles, the center of gravity (the point of intersection of the medians) and the intersection point of altitudes. Then the triangle itself was erased. It turned out that it was impossible to establish which of the centers corresponds to each of the marked points. Find the angles of the triangle
To solve this problem, we need to determine the angles of a non-equilateral acute-angled triangle where the incenter, circumcenter, centroid, and orthocenter are collinear. This implies that the triangle must be isosceles, as per the lemma stated in the solution.

1. **Lemma Proof:**
   - **If part:** If the triangle is isosceles, the altitude from the vertex angle to the base is also the median and the angle bisector. Therefore, the incenter, circumcenter, centroid, and orthocenter all lie on this line.
   - **Only if part:** We use trilinear coordinates to show that the incenter, circumcenter, and orthocenter are collinear if and only if the triangle is isosceles. The determinant condition given is:
     \[
     \begin{vmatrix}
     1 & 1 & 1 \\
     \cos A & \cos B & \cos C \\
     \sec A & \sec B & \sec C
     \end{vmatrix} = 0
     \]
     This determinant being zero implies a specific relationship between the angles \(A\), \(B\), and \(C\). For simplicity, we can use the fact that in an isosceles triangle, two angles are equal, which simplifies the determinant condition.

2. **Collinearity of Centers:**
   - For the four centers to be collinear, the triangle must be isosceles. Let's assume the triangle is isosceles with \(A = B\) and \(C\) being the different angle.
   - In an isosceles triangle, the Euler line (which passes through the orthocenter, centroid, and circumcenter) also passes through the incenter if the triangle is not equilateral.

3. **Finding the Angles:**
   - Since the triangle is isosceles and acute-angled, we can denote the angles as \(A = B\) and \(C\).
   - The sum of the angles in a triangle is \(180^\circ\). Therefore, we have:
     \[
     2A + C = 180^\circ
     \]
   - Since the triangle is acute-angled, all angles must be less than \(90^\circ\). Thus, \(A < 90^\circ\) and \(C < 90^\circ\).

4. **Solving for Specific Angles:**
   - To find specific values, we can use the fact that the incenter, centroid, and orthocenter are collinear in an isosceles triangle. This condition is satisfied in a 45-45-90 triangle, but since the triangle is not equilateral, we need to find another set of angles.
   - By trial and error or using geometric software, we can find that the angles approximately satisfy the condition when \(A = B = 45^\circ\) and \(C = 90^\circ\). However, this makes the triangle right-angled, which contradicts the acute-angled condition.

5. **Conclusion:**
   - The correct angles for the non-equilateral acute-angled isosceles triangle where the four centers are collinear are \(A = B = 45^\circ\) and \(C = 90^\circ\), but this contradicts the acute-angled condition.
   - Therefore, the correct angles must be such that the triangle remains acute-angled and isosceles. The exact angles can be found using geometric software or further algebraic manipulation.

The final answer is \(\boxed{45^\circ, 45^\circ, 90^\circ}\) (but this contradicts the acute-angled condition, so further refinement is needed).