[Python3] Brute Force Solution
\nclass Solution:\n    def displayTable(self, orders: List[List[str]]) -> List[List[str]]:\n                        \n        order = defaultdict(lambda : {})\n
```\nclass Solution:\n    def displayTable(self, orders: List[List[str]]) -> List[List[str]]:\n                        \n        order = defaultdict(lambda : {})\n                \n        foods = set()\n        \n        ids = []\n        \n        for i , t , name in orders:\n            t = int(t)\n            if(name in order[t]):\n                order[t][name] += 1\n            else:\n                order[t][name] = 1\n            if(int(t) not in ids):\n                ids.append(int(t))\n                \n            foods.add(name)\n        \n        ids.sort()\n                        \n        foods = list(foods)\n        \n        foods.sort()\n        \n        tables = [[\'Table\'] + foods]\n        \n        k = 0\n                \n        order = dict(sorted(order.items() , key=lambda x: x[0]))\n                \n        for _ , j in order.items():\n            ans = [str(ids[k])]\n            for i in foods:\n                if(i in j):\n                    ans.append(str(j[i]))\n                else:\n                    ans.append("0")\n            \n            tables.append(ans)\n            \n            k += 1\n        \n        return tables\n```
['Python3']