I consider that nine countries are all different.And all names of the countries are given in only three letters.
If two countries have relation and common language, there is two edges, A->B and B->A.
Then just find whether there is a circle that involves all the country.
Thanks
