using System.Collections.Generic;
public static void Main()
string[] array = {"2", "1", "1", "2", "3", "3", "2", "2", "2", "1"};
string previous = string.Empty;
List<string> sequence = new List<string>();
List<string> tempSequence = new List<string>();
for (int i = 0; i < array.Length; i++)
if (array[i] != previous)
tempSequence.Add(previous);
if (tempSequence.Count > sequence.Count)
sequence = new List<string>(tempSequence);
tempSequence.Add(previous);
Console.WriteLine(string.Join(", ", sequence));