{"trustable":false,"prependHtml":"\u003cstyle type\u003d\"text/css\"\u003e\n #problem-body \u003e pre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333;\n background: rgba(255, 255, 255, 0.5);\n border: 1px solid #ccc;\n border-radius: 6px;\n }\n\u003c/style\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv id\u003d\"problem-body\"\u003e\n \u003cp\u003eWe are now in the future and scientists became bored so they wanted to try something new by creating new sorts of fruits by transferring genes from one fruit into the genome of another one.\u003c/p\u003e\n \u003cp\u003eBut they didn\u0027t know what to call the new fruits. The boss finally decides to use the shortest string that contains both names of the original fruits as sub-sequences as the new name. For instance, \"applear\" contains \"apple\" and \"pear\" (APPLEar and apPlEAR), and there is no shorter string that has the same property. \u003cbr\u003e\n A combination of a cranberry and a boysenberry would therefore be called a \"boysecranberry\" or a \"craboysenberry\", for example.\u003c/p\u003e\n \u003cp\u003eYour job is to write a program that computes such a shortest name for a combination of two given fruits.\u003c/p\u003e\n \u003ch3\u003eInput Specification\u003c/h3\u003e\n \u003cp\u003eEach line of the input file contains two strings that represent the names of the fruits that should be combined. All names have a maximum length of 100 and only consist of alphabetic characters.\u003cbr\u003e\n Input is terminated by end of file.\u003c/p\u003e\n \u003ch3\u003eOutput Specification\u003c/h3\u003e\n \u003cp\u003eFor each test case, output the shortest name of the resulting fruit on one line. If more than one shortest name is possible, any one is acceptable.\u003c/p\u003e\n \u003ch3\u003eSample Input\u003c/h3\u003e\n \u003cpre\u003eapple peach\nananas banana\npear peach\n\u003c/pre\u003e\n \u003ch3\u003eSample Output\u003c/h3\u003e\n \u003cpre\u003eappleach\nbananas\npearch\n\u003c/pre\u003e\n\u003c/div\u003e"}}]}