Topology of polymer chains under nanoscale confinement.