Easy solution with Python
\nclass Solution:\n    def reorderLogFiles(self, logs: List[str]) -> List[str]:\n        d = []\n        l = []\n        for e in logs:\n            if e.split(
```\nclass Solution:\n    def reorderLogFiles(self, logs: List[str]) -> List[str]:\n        d = []\n        l = []\n        for e in logs:\n            if e.split()[1].isdigit():\n                d.append(e)\n            else:\n                l.append(e)\n        l = sorted(l, key=lambda x:(x[x.find(\' \'):],x[:x.find(\' \')]))\n        return l + d\n```
[]