using System.Collections.Generic;
public static void Main()
var words = new string[]{"vesal", "behrouzi", "test", "word"};
var letters = new char[]{'a', 'b', 'c', 'd', 'e', 'f'};
var places = new HashSet<Int32>[26];
for (int i = 0; i < 26; i++)
places[i] = new HashSet<Int32>();
for (int i = 0; i < words.Length; i++)
for (int t = 0; t < word.Length; t++)
var location = word[t] - 'a';
for (int i = 0; i < letters.Length; i++)
var location = letters[i] - 'a';
Console.Write("Letter {0} ", letters[i]);
if (places[location].Count > 0)
Console.WriteLine("can be found at {1} indexes", letters[i], String.Join(", ", places[location]));
Console.WriteLine("not found");