using System;
using System.Text;
public class Test
{
public static void Main()
{
string s="*****\n***\n****";
StringBuilder sb = new StringBuilder();
string subj = "asd";
int counter = 0;
for (int i = 0; i < s.Length; i++) {
if (s[i] == '*') {
sb.Append(subj[counter % subj.Length]);
counter++;
continue;
}
sb.Append(s[i]);
}
Console.WriteLine(sb.ToString());
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uVGV4dDsKCnB1YmxpYyBjbGFzcyBUZXN0CnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBNYWluKCkKCXsKCQlzdHJpbmcgcz0iKioqKipcbioqKlxuKioqKiI7CiAgICAgICAgU3RyaW5nQnVpbGRlciBzYiA9IG5ldyBTdHJpbmdCdWlsZGVyKCk7CiAgICAgICAgc3RyaW5nIHN1YmogPSAiYXNkIjsKICAgICAgICBpbnQgY291bnRlciA9IDA7CiAgICAgICAgZm9yIChpbnQgaSA9IDA7IGkgPCBzLkxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgIGlmIChzW2ldID09ICcqJykgewogICAgICAgICAgICAgICAgc2IuQXBwZW5kKHN1YmpbY291bnRlciAlIHN1YmouTGVuZ3RoXSk7ICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICBjb3VudGVyKys7CiAgICAgICAgICAgICAgICBjb250aW51ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBzYi5BcHBlbmQoc1tpXSk7CiAgICAgICAgfQogICAgICAgIENvbnNvbGUuV3JpdGVMaW5lKHNiLlRvU3RyaW5nKCkpOwoJfQp9