✅ One Line Solution
(Disclaimer: this is not an example to follow in a real project - it is written for fun and training mostly)Code #1.1 - One LineTime complexity: O(m∗n). Space c
(Disclaimer: this is not an example to follow in a real project - it is written for fun and training mostly)

# Code #1.1 - One Line
Time complexity: $$O(m*n)$$. Space complexity: $$O(m*n)$$.
```python3
class Solution:
    def firstCompleteIndex(self, a: List[int], g: List[List[int]]) -> int:
        return (d:=dict(zip(a,count()))) and min(map(max,(q:=[[*map(d.get,r)] for r in g])+[*zip(*q)]))
```

# Code #1.2 - Unwrapped
```python3
class Solution:
    def firstCompleteIndex(self, a: List[int], g: List[List[int]]) -> int:
        d = {v:i for i,v in enumerate(a)}
        q = [[d[v] for v in r] for r in g]

        return min(map(max, q + [*zip(*q)]))
```

(Disclaimer 2: code above is just a product of fantasy packed into one line, it is not claimed to be 'true' oneliners - please, remind about drawbacks only if you know how to make it better)
['Array', 'Hash Table', 'Matrix', 'Python', 'Python3']