Pregunta de entrevista de Yandex

Remove subsequent repeating symbols from an input string; e.g.: "aabbbcaaccb" -> "abcacb"