Pergunta de entrevista da empresa DANIEL

You are given a set of rules to decode. based on that information decode encoded string.