using System;
using System.Text.RegularExpressions;
public class Test
{
public static void Main()
{
var input = "stacktraceabcdefghijklmnopqrstuvwxyztacktraceabcdefghijklmnopqrswxyztacktraceabcdefghijk";
var regex = new Regex(@".{10}");
string result = regex.Replace(input, "$&" + Environment.NewLine);
Console.WriteLine(result);
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uVGV4dC5SZWd1bGFyRXhwcmVzc2lvbnM7CnB1YmxpYyBjbGFzcyBUZXN0CnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBNYWluKCkKCXsKCQl2YXIgaW5wdXQgPSAic3RhY2t0cmFjZWFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6dGFja3RyYWNlYWJjZGVmZ2hpamtsbW5vcHFyc3d4eXp0YWNrdHJhY2VhYmNkZWZnaGlqayI7CgkJdmFyIHJlZ2V4ID0gbmV3IFJlZ2V4KEAiLnsxMH0iKTsKCQlzdHJpbmcgcmVzdWx0ID0gcmVnZXguUmVwbGFjZShpbnB1dCwgIiQmIiArIEVudmlyb25tZW50Lk5ld0xpbmUpOwoJCUNvbnNvbGUuV3JpdGVMaW5lKHJlc3VsdCk7Cgl9Cn0=