<prompt> Kuna lugha mpya ya kigeni ambayo inatumia alfabeti ya Kiingereza. Hata hivyo, utaratibu kati ya herufi haujulikani kwako. Unapewa orodha ya maneno ya kamba kutoka kamusi ya lugha ya kigeni, ambapo kamba katika maneno zimepangwa kwa usahihi kwa sheria za lugha hii mpya. Rudi safu ya herufi za kipekee katika lugha mpya ya kigeni zilizopangwa kwa usahihi kwa kufuata sheria za lugha mpya. Ikiwa hakuna suluhisho, rudia . Ikiwa kuna suluhisho nyingi, rudisha yoyote ya hizo. Safu ya s ni ndogo zaidi ya safu ya t ikiwa, kwa herufi ya kwanza ambapo hutofautiana, herufi katika s inakuja kabla ya herufi katika t katika lugha ya kigeni. Ikiwa herufi za kwanza min length, t.length ni sawa, basi s ni ndogo tu ikiwa na ikiwa s. th. t. s: maneno:Kutatua hii kwa kutumia Python.  <response>: Heres the Python solution to your problem:def alien_orderwords: Create a dictionary to store incoming and outgoing edges for each character incoming_edges char: 0 for word in words for char in word outgoing_edges char: set for word in words for char in word Add edges to the graph based on adjacent words for i in rangelenwords - 1: word1 wordsi word2 wordsi 1 if lenword1 lenword2 and word1.startswithword2: return for j in rangeminlenword1, lenword2: if word1j ! word2j: outgoing_edgesword1j.addword2j incoming_edgesword2j 1 break Perform topological sort queue char for char in incoming_edges if incoming_edgeschar 0 topo_order while queue: char queue.pop0 topo_order char for next_char in outgoing_edgeschar: incoming_edgesnext_char - 1 if incoming_edgesnext_char 0: queue.appendnext_char if lentopo_order lenincoming_edges: return return topo_orderYou can call this function with a list of words to get the unique letters in the new alien language sorted in lexicographically increasing order. For example:words wrt,wrf,er,ett,rfttprintalien_orderwords Output: wertf 