At the lake's exit it turns inland, towards the north, leaving Stein am Rhein within Switzerland, as well as the municipality of Ramsen (canton of Schaffhausen). It then returns to the Rhine, including Gailingen in Germany, but then turns north again to include the bulk of the canton of Schaffhausen, a right-bank territory including the town of Schaffhausen itself, in Switzerland, separating it from the German Schwarzwald-Baar-Kreis and Waldshut district. Büsingen am Hochrhein (Constance district) is a German exclave which has borders with three Swiss cantons, namely Zurich, Schaffhausen, and Thurgau.