class Solution:
def removeSubfolders(self, folder: List[str]) -> List[str]:
folder.sort()
res = [folder[0]]
for i in range(1, len(folder)):
if folder[i].startswith(res[-1]) and folder[i][len(res[-1])] == '/': pass
else: res.append(folder[i])
return res