Choose a glass shape, then reverse the ray. With the same media and corresponding angles, it follows exactly the same path back.
Orange dashed line: forward path · Blue arrows: current direction · Grey dashed lines: normals · Purple values: angles measured from the normal.
Angles are measured from the normal. Reversing swaps the incident and refracted angles at each boundary: n₁ sin θ₁ = n₂ sin θ₂. Shapes are shown in cross-section; partial reflections are omitted.