using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
namespace ConsoleApplication_C_Sharp
{
static class Program
{
static void Main(string[] args)
{
string s = "CSharp c c++ Java Python php";
string[] arr = Regex.Split(s, @"\W");
var list = new List<string>();
foreach (string word in arr)
{
if (!string.IsNullOrEmpty(word) && char.IsUpper(word[0]))
list.Add(word);
}
foreach (var w in list)
{
Console.WriteLine(w);
}
}
}
}
/*
run:
CSharp
Java
Python
*/