using System.Runtime.Serialization.Formatters.Binary;
using System.Collections.Generic;
public static void Main()
var res = GetGroups(input.Split(Environment.NewLine.ToCharArray()));
Console.WriteLine(string.Join(",",r));
private static IEnumerable<IEnumerable<string>> GetGroups(IEnumerable<string> source)
var grouped = new List<string>();
foreach(var el in source)
if(!string.IsNullOrEmpty(el))
grouped = new List<string>();