using System.Collections.Generic;
using System.Collections;
public static void Main(string[] args)
List<List<string>> dutchOutput = new List<List<string>>();
List<string> row = new List<string>();
List<List<string>> finalOutput = new List<List<string>>();
List<List<string>> skippedRows = new List<List<string>>();
string currentCallPutValue = "";
string lastCallPutValue = "";
bool addAlternateRow = false;
bool checkSkippedRows = false;
foreach(var item in dutchOutput){
currentCallPutValue = item[1];
if(currentCallPutValue == ""){
if(string.IsNullOrEmpty(lastCallPutValue))
else if(!string.IsNullOrEmpty(currentCallPutValue) && !string.IsNullOrEmpty(lastCallPutValue) && currentCallPutValue == lastCallPutValue)
if(addAlternateRow && currentCallPutValue == "put")
var selectedRow = skippedRows.Where(f=>f[1] == "call").FirstOrDefault();
finalOutput.Add(selectedRow);
skippedRows.Remove(selectedRow);
else if(!string.IsNullOrEmpty(currentCallPutValue) && !string.IsNullOrEmpty(lastCallPutValue) && currentCallPutValue != lastCallPutValue)
lastCallPutValue = item[1];