Stability estimates for a boundary identification problem in a thin domain