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