using System;
using System.Text.RegularExpressions;
public class Test
{
public static void Main()
{
string str = "12345678909876543212";
string result = Regex.Replace(str, @".{5}(?!$)", "$0-");
Console.WriteLine(result);
Console.ReadLine();
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uVGV4dC5SZWd1bGFyRXhwcmVzc2lvbnM7CiAKcHVibGljIGNsYXNzIFRlc3QKewpwdWJsaWMgc3RhdGljIHZvaWQgTWFpbigpCnsKc3RyaW5nIHN0ciA9ICIxMjM0NTY3ODkwOTg3NjU0MzIxMiI7CnN0cmluZyByZXN1bHQgPSBSZWdleC5SZXBsYWNlKHN0ciwgQCIuezV9KD8hJCkiLCAiJDAtIik7CkNvbnNvbGUuV3JpdGVMaW5lKHJlc3VsdCk7CkNvbnNvbGUuUmVhZExpbmUoKTsKfQp9