using System.Collections.Generic;
public static void Main()
Console.WriteLine("Hello World");
public static bool Verify(List<string> words, List<char> order)
Dictionary<char, int> dict = new Dictionary<char, int>();
BuildDictionary(order, dict);
for(int i = 1; i < words.Count; i++)
if(!Compare(words[i-1], words[i], dict))
public static bool Compare(string word1, string word2, Dictionary<char, int> order)
int s1 = word1.Length - 1, s2 = word2.Length - 1;
int index1 = 0, index2 = 0;
while(index1 <= s1 && index2 <= s2)
if(order[word1[index1]] < order[word2[index2]])
else if(order[word1[index1]] > order[word2[index2]])
if(index2 > s2) return true;