{"trustable":true,"sections":[{"title":"","value":{"format":"MD","content":"We found a dictionary of the Ancient Civilization Mayo (ACM) during excavation of the ruins. After analysis of the dictionary, we revealed they used a language that had not more than **26** letters. So one of us mapped each letter to a different English alphabet and typed all the words in the dictionary into a computer.\r\n\r\nHow the words are ordered in the dictionary, especially whether they are ordered lexicographically, is an interesting topic to many people. As a good programmer, you are requested to write a program to judge whether we can consider the words to be sorted in a lexicographical order.\r\n\r\nNote: In a lexicographical order, a word always precedes other words it is a prefix of. For example, \"**ab**\" precedes \"**abc**\", \"**abde**\", and so on.\r\n\r\n#### Input\r\nConsists of multiple datasets. Each dataset is formatted as follows:\r\n\r\n**n**\r\n\r\n**string[1]**\r\n\r\n**. . .**\r\n\r\n**string[n]**\r\n\r\nEach dataset consists of **n** + **1** lines. The first line of each dataset contains an integer that indicates **n** (**1** ≤ **n** ≤ **500**). The **i**-th line of the following **n** lines contains **string[i]**, which consists of up to **10** English lowercase letters.\r\n\r\nThe end of the input is \"**0**\", and this should not be processed.\r\n\r\n#### Output\r\nPrint either \"**yes**\" or \"**no**\" in a line for each dataset, in the order of the input. If all words in the dataset can be considered to be ordered lexicographically, print \"**yes**\". Otherwise, print \"**no**\"."}},{"title":"Example","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e4\ncba\ncab\nb\na\n3\nbca\nab\na\n5\nabc\nacb\nb\nc\nc\n5\nabc\nacb\nc\nb\nb\n0\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eyes\nno\nyes\nno\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}