{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"Section1\"\u003e\n\t\u003cp class\u003d\"MsoNormal\"\u003e\n\t\t\u003cspan style\u003d\"color: windowtext;\"\u003eGiven two strings of lowercase letters, \u003c/span\u003e\u003cb style\u003d\"color: windowtext;\"\u003e\u003ci\u003ea\u003c/i\u003e\u003c/b\u003e\u003cspan style\u003d\"color: windowtext;\"\u003e and \u003c/span\u003e\u003cb style\u003d\"color: windowtext;\"\u003e\u003ci\u003eb\u003c/i\u003e\u003c/b\u003e\u003cspan style\u003d\"color: windowtext;\"\u003e, print the longest string \u003c/span\u003e\u003cb style\u003d\"color: windowtext;\"\u003e\u003ci\u003ex\u003c/i\u003e\u003c/b\u003e\u003cspan style\u003d\"color: windowtext;\"\u003e of lowercase letters such that there is a permutation of \u003c/span\u003e\u003cb style\u003d\"color: windowtext;\"\u003e\u003ci\u003ex\u003c/i\u003e\u003c/b\u003e\u003cspan style\u003d\"color: windowtext;\"\u003e that is a subsequence of \u003c/span\u003e\u003cb style\u003d\"color: windowtext;\"\u003e\u003ci\u003ea\u003c/i\u003e\u003c/b\u003e\u003cspan style\u003d\"color: windowtext;\"\u003e and there is a permutation of \u003c/span\u003e\u003cb style\u003d\"color: windowtext;\"\u003e\u003ci\u003ex\u003c/i\u003e\u003c/b\u003e\u003cspan style\u003d\"color: windowtext;\"\u003e that is a subsequence of \u003c/span\u003e\u003cb style\u003d\"color: windowtext;\"\u003e\u003ci\u003eb\u003c/i\u003e\u003c/b\u003e\u003cspan style\u003d\"color: windowtext;\"\u003e.\u003c/span\u003e \u003c/p\u003e\n\u003c/div\u003e\n\u003cp\u003e\n\u003ccenter\u003e\n\u003cimg src\u003d\"https://scontent.fdac14-1.fna.fbcdn.net/v/t1.15752-9/219822693_4330064563682305_5466623073437068139_n.jpg?_nc_cat\u003d108\u0026ccb\u003d1-3\u0026_nc_sid\u003dae9488\u0026_nc_ohc\u003dYLkW8pctSckAX8810to\u0026tn\u003dCjC0QUKwes140EFN\u0026_nc_ht\u003dscontent.fdac14-1.fna\u0026oh\u003d56310e428e383563db1034b3c53263ce\u0026oe\u003d612A4DC4\" alt\u003d\"Paris\" align\u003d\"center\" width\u003d\"350\" height\u003d\"350\"\u003e\n\u003c/center\u003e\n\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003e\n\t\u003cspan style\u003d\"color: rgb(0, 0, 0);\"\u003eInput file contains several lines of input. Consecutive two lines make a set of input. That means in the input file line\u0026nbsp;\u003c/span\u003e\u003cb style\u003d\"color: rgb(0, 0, 0);\"\u003e1\u003c/b\u003e\u003cspan style\u003d\"color: rgb(0, 0, 0);\"\u003e\u0026nbsp;and\u0026nbsp;\u003c/span\u003e\u003cb style\u003d\"color: rgb(0, 0, 0);\"\u003e2\u003c/b\u003e\u003cspan style\u003d\"color: rgb(0, 0, 0);\"\u003e\u0026nbsp;is a set of input, line\u0026nbsp;\u003c/span\u003e\u003cb style\u003d\"color: rgb(0, 0, 0);\"\u003e3\u003c/b\u003e\u003cspan style\u003d\"color: rgb(0, 0, 0);\"\u003e\u0026nbsp;and\u0026nbsp;\u003c/span\u003e\u003cb style\u003d\"color: rgb(0, 0, 0);\"\u003e4\u003c/b\u003e\u003cspan style\u003d\"color: rgb(0, 0, 0);\"\u003e\u0026nbsp;is a set of input and so on. The first line of a pair contains\u0026nbsp;\u003c/span\u003e\u003cb style\u003d\"color: rgb(0, 0, 0);\"\u003e\u003ci\u003ea\u003c/i\u003e\u003c/b\u003e\u003cspan style\u003d\"color: rgb(0, 0, 0);\"\u003e\u0026nbsp;and the second contains\u0026nbsp;\u003c/span\u003e\u003cb style\u003d\"color: rgb(0, 0, 0);\"\u003e\u003ci\u003eb\u003c/i\u003e\u003c/b\u003e\u003cspan style\u003d\"color: rgb(0, 0, 0);\"\u003e. Each string is on a separate line and consists of at most\u0026nbsp;\u003c/span\u003e\u003cb style\u003d\"color: rgb(0, 0, 0);\"\u003e1000\u003c/b\u003e\u003cspan style\u003d\"color: rgb(0, 0, 0);\"\u003e\u0026nbsp;lowercase letters.\u003c/span\u003e\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003e\n\t\u003cspan style\u003d\"color: rgb(0, 0, 0);\"\u003eFor each set of input, output a line containing\u0026nbsp;\u003c/span\u003e\u003cb style\u003d\"color: rgb(0, 0, 0);\"\u003e\u003ci\u003ex\u003c/i\u003e\u003c/b\u003e\u003cspan style\u003d\"color: rgb(0, 0, 0);\"\u003e. If several\u0026nbsp;\u003c/span\u003e\u003cb style\u003d\"color: rgb(0, 0, 0);\"\u003e\u003ci\u003ex\u003c/i\u003e\u003c/b\u003e\u003cspan style\u003d\"color: rgb(0, 0, 0);\"\u003e\u0026nbsp;satisfy the criteria above, choose the first one in alphabetical order.\u003c/span\u003e\u003c/p\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e\npretty\nwomen\nwalking\ndown\nthe\nstreet\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e\ne\n\u003cspan data-scayt_word\u003d\"nw\" data-scaytid\u003d\"3\"\u003enw\u003c/span\u003e\net\u003c/pre\u003e"}}]}