using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace _3ShmoogleCounter
public static void Main()
string input = Console.ReadLine();
var regexInts = new Regex(@"(?:int\s)(?<word>\b\S+\b)");
var regexDoubles = new Regex(@"(?:double\s)(?<word>\b\S+\b)");
List<string> outputInts = new List<string>();
List<string> outputDoubles = new List<string>();
while (input != "//END_OF_CODE")
var matchesInts = regexInts.Matches(input);
foreach (Match match in matchesInts)
var resultInts = match.Groups["word"].Value;
outputInts.Add(resultInts);
var matchesDoubles = regexDoubles.Matches(input);
foreach (Match match in matchesDoubles)
var resultDoubles = match.Groups["word"].Value;
outputInts.Add(resultDoubles);
input = Console.ReadLine();
for (int i = 0; i < outputInts.Count; i++)
Console.WriteLine("Ints: {[0]}", string.Join(", ", outputInts[i]));
for (int j = 0; j < outputDoubles.Count; j++)
Console.WriteLine("Doubles: {[0]}", string.Join(", ", outputDoubles[j]));