Graph: (), (), (), (). Run Bellman-Ford from node . After iterations, dist[1] = -6, dist[2] = -7, dist[3] = -9. The -th iteration improves dist[1] via edge . Set parent[1] = 3.
Walk back from node : . After steps, you are at node (inside the cycle). Follow parents: . Collect nodes until you return to . Output: .