The exchange was part of the terms of the Treaty of Lausanne which ended the war