Python Solution
\nclass Solution:\n    def reorderLogFiles(self, logs: List[str]) -> List[str]:\n        \n        digit_logs = []\n        letter_logs = []\n        \n        
```\nclass Solution:\n    def reorderLogFiles(self, logs: List[str]) -> List[str]:\n        \n        digit_logs = []\n        letter_logs = []\n        \n        for log in logs:\n            if log.split()[1].isdigit():\n                digit_logs.append(log)\n            else:\n                letter_logs.append(log)\n        \n        letter_logs.sort(key=lambda x: x.split()[0])\n        letter_logs.sort(key=lambda x: x.split()[1:])\n        \n        letter_logs.extend(digit_logs)\n        \n        return letter_logs\n```
[]