using System;
using System.Linq;
class Program
{
static void Main() {
string s1 = "c# c++ java php javascript";
String s2 = "c python c++ c# java node.js";
string[] words1 = s1.Split(" ", StringSplitOptions.RemoveEmptyEntries);
string[] words2 = s2.Split(" ", StringSplitOptions.RemoveEmptyEntries);
var matches = words1.Intersect(words2);
foreach (var word in matches) {
Console.WriteLine(word);
}
}
}
/*
run:
c#
c++
java
*/