Initially put masks at appropriate positions and adjust their widths.