{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":" \n \u003cp\u003e小Hi的电脑的文件系统中一共有N个文件,例如:\u003c/p\u003e \n \u003cp\u003e/hihocoder/offer23/solutions/p1 \u003c/p\u003e \n \u003cp\u003e/hihocoder/challenge30/p1/test \u0026nbsp;\u003c/p\u003e \n \u003cp\u003e/game/moba/dota2/uninstall \u0026nbsp;\u003c/p\u003e \n \u003cp\u003e经过统计,小Hi认为他的电脑中子目录实在太多了,于是他决定减少子目录的数量。小Hi发现其中一些子目录只包含另一个子目录,例如/hihocoder/offer22只包含一个子目录solution,/game只包含一个子目录moba,而moba也只包含一个子目录dota2。小Hi决定把这样的子目录合并成一个子目录,并且将被合并的子目录的名字用\u0027-\u0027连起来作为新子目录的名字。合并之后上例的3个文件的路径会变为:\u003c/p\u003e \n \u003cp\u003e/hihocoder/offer23-solutions/p1\u003c/p\u003e \n \u003cp\u003e/hihocoder/challenge30-p1/test\u003c/p\u003e \n \u003cp\u003e/game-moba-dota2/uninstall\u003c/p\u003e \n "}},{"title":"Input","value":{"format":"HTML","content":" \n \u003cp\u003e第一行包含一个整数N (1 ≤ N ≤ 10000) \u0026nbsp; \u003c/p\u003e \n \u003cp\u003e以下N行每行包含一个字符串,代表一个文件的绝对路径。保证路径从根目录\"/\"开始,并且文件名和目录名只包含小写字母和数字。 \u0026nbsp;\u003c/p\u003e \n \u003cp\u003e对于80%的数据,N个文件的绝对路径长度之和不超过10000 \u0026nbsp;\u003c/p\u003e \n \u003cp\u003e对于100%的数据,N个文件的绝对路径长度之和不超过500000\u003c/p\u003e \n "}},{"title":"Output","value":{"format":"HTML","content":" \n \u003cp\u003e对于输入中的每个文件,输出合并子目录之后该文件的绝对路径。\u003c/p\u003e \n \u003c/div\u003e \n "}},{"title":"Sample Input","value":{"format":"HTML","content":" \n \u003cpre\u003e3\r\n/hihocoder/offer23/solutions/p1\r\n/hihocoder/challenge30/p1/test\r\n/game/moba/dota2/uninstall\u003c/pre\u003e \n "}},{"title":"Sample Output","value":{"format":"HTML","content":" \n \u003cpre\u003e/hihocoder/offer23-solutions/p1\r\n/hihocoder/challenge30-p1/test\r\n/game-moba-dota2/uninstall\u003c/pre\u003e \n "}}]}