using System;
using System.Linq;
public class Test
{
public static void Main()
{
string str = "Split handles splitting upon string and character delimiters.";
var pairs = str.Split(' ')
.Select((s,i) => new {s, i})
.GroupBy(n => n.i / 2)
.Select(g => string.Join(" ", g.Select(p=>p.s).ToArray()))
.ToList();
foreach (var s in pairs)
Console.WriteLine(s);
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uTGlucTsKCnB1YmxpYyBjbGFzcyBUZXN0CnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBNYWluKCkKCXsKc3RyaW5nIHN0ciA9ICJTcGxpdCBoYW5kbGVzIHNwbGl0dGluZyB1cG9uIHN0cmluZyBhbmQgY2hhcmFjdGVyIGRlbGltaXRlcnMuIjsKdmFyIHBhaXJzID0gc3RyLlNwbGl0KCcgJykKICAgIC5TZWxlY3QoKHMsaSkgPT4gbmV3IHtzLCBpfSkKICAgIC5Hcm91cEJ5KG4gPT4gbi5pIC8gMikKICAgIC5TZWxlY3QoZyA9PiBzdHJpbmcuSm9pbigiICIsIGcuU2VsZWN0KHA9PnAucykuVG9BcnJheSgpKSkKICAgIC5Ub0xpc3QoKTsKZm9yZWFjaCAodmFyIHMgaW4gcGFpcnMpCiAgICBDb25zb2xlLldyaXRlTGluZShzKTsKCgp9Cn0=