Python Hard
```python3 []
class UnionFind:

    def __init__(self, N):
        self.count = N              
        self.parent = [i for i in range(N)]
        self.rank = [1] * N
        
        
    def find(self, p):
        if p != self.parent[p]:
            self.parent[p] = self.find(self.parent[p]) 
        return self.parent[p]

    def union(self, p, q):
        prt, qrt = self.find(p), self.find(q)
        if prt == qrt: return False
        if self.rank[prt] >= self.rank[qrt]: 
            self.parent[qrt] = prt
            self.rank[prt] += self.rank[qrt]
        else:
            self.parent[prt] = qrt
            self.rank[qrt] += self.rank[prt]
            
        self.count -= 1 
        return True 
	    

class Solution:
    def friendRequests(self, n: int, restrictions: List[List[int]], requests: List[List[int]]) -> List[bool]:
        '''
        we can handle requests in any oder, not sure if thats helpful

        we can 
        '''
        N = n
        A = []
        UF = UnionFind(N)

        for u, v in requests:
            pu, pv = UF.find(u), UF.find(v)

            if pu == pv:
                A.append(True)
                continue

            check = True

            for uu, vv in restrictions:
                puu, pvv = UF.find(uu), UF.find(vv)

                if puu == pu and pvv == pv:
                    check = False
                    break
        
                if puu == pv and pvv == pu:
                    check = False
                    break

            if check:
                A.append(True)
                UF.union(u, v)
            else:
                A.append(False)
        return A
```
['Python3']