using System;
using System.Globalization;
using System.Linq;
public class Program
{
public static void Main(string[] args)
{
var currTermPairs = new []{ "A", "C", "AA", "B", "CC", "BB" };
string[][] allArrays = currTermPairs
.Select((pair, index) => new { pair, index })
.GroupBy(x => x.index % 2)
.Select(g => g.Select(x => x.pair).ToArray())
.ToArray();
foreach(var arr in allArrays)
Console.WriteLine(string.Join(",",arr));
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uR2xvYmFsaXphdGlvbjsKdXNpbmcgU3lzdGVtLkxpbnE7CiAKcHVibGljIGNsYXNzIFByb2dyYW0KewogCnB1YmxpYyBzdGF0aWMgdm9pZCBNYWluKHN0cmluZ1tdIGFyZ3MpCnsKICAgICAgICAgICAgdmFyIGN1cnJUZXJtUGFpcnMgPSBuZXcgW117ICJBIiwgIkMiLCAiQUEiLCAiQiIsICJDQyIsICJCQiIgfTsKCiAgICAgICAgICAgIHN0cmluZ1tdW10gYWxsQXJyYXlzID0gY3VyclRlcm1QYWlycwogICAgICAgICAgICAgICAgLlNlbGVjdCgocGFpciwgaW5kZXgpID0+IG5ldyB7IHBhaXIsIGluZGV4IH0pCiAgICAgICAgICAgICAgICAuR3JvdXBCeSh4ID0+IHguaW5kZXggJSAyKQogICAgICAgICAgICAgICAgLlNlbGVjdChnID0+IGcuU2VsZWN0KHggPT4geC5wYWlyKS5Ub0FycmF5KCkpCiAgICAgICAgICAgICAgICAuVG9BcnJheSgpOwogICAgICAgICAgICAgICAgCiAgICAgICAgZm9yZWFjaCh2YXIgYXJyIGluIGFsbEFycmF5cykKICAgICAgICAgICAgQ29uc29sZS5Xcml0ZUxpbmUoc3RyaW5nLkpvaW4oIiwiLGFycikpOwp9Cn0=