Question d’entretien chez Huawei Technologies

Code: eleminate 3 same char from string until no char can be removed print final string.