Solution in Python 3 (beats ~100%) (five lines)
```\nclass Solution:\n    def reorderLogFiles(self, G: List[str]) -> List[str]:\n    \tA, B, G = [], [], [i.split() for i in G]\n    \tfor g in G:\n    \t\tif g
```\nclass Solution:\n    def reorderLogFiles(self, G: List[str]) -> List[str]:\n    \tA, B, G = [], [], [i.split() for i in G]\n    \tfor g in G:\n    \t\tif g[1].isnumeric(): B.append(g)\n    \t\telse: A.append(g)\n    \treturn [" ".join(i) for i in sorted(A, key = lambda x: x[1:]+[x[0]]) + B]\n\t\t\n\t\t\n- Junaid Mansuri\n(LeetCode ID)@hotmail.com
['Python', 'Python3']