On my last full day in Germany, I plan to take a day trip to Heidelberg. I will be staying near the Gateway Gardens S-Bahn by Frankfurt Airport. My plan is to leave my return trip open to give me flexibility.
When I buy the ticket back, will the ticket machine require me to specify which train to take? I’m open to any train including ICE. Initially, I thought about buying a ticket from the machine as soon as I arrive at Heidelberg but if it requires me to select a train, I lose flexibility. This is why I’m asking.