class UnionFindTree:
    """
    Union Find Tree

    Attributes
    ----------
    _parents : list
        Parents of each nodes.
        A parent of a root node is -1.
    _size : int
        The number of nodes of the tree
    _rank : int
        The size of a tree to which each root belongs to.
        If the node is not root, this rank might be incollect.
    """

    def __init__(self, size):
        """
        Parameters
        ----------
        size : int
            The number of nodes of the tree
        """
        self._size = size
        self._parents = [-1 for i in range(size)]
        self._rank = [1 for i in range(size)]

    def find(self, node):
        """
        Return the root of the node.
        If the node is root and have no parent, then return the node itself.

        Parameters
        ----------
        node : int
            A node whose parent will be returned.

        Returns
        -------
        root : int
            A parent of the node.
        """
        if self._parents[node] == -1:
            return node
        else:
            root = self.find(self._parents[node])
            self._parents[node] = root
            return root

    def union(self, node1, node2):
        """
        Unite two trees

        Parameters
        ----------
        node1 : int
            The first tree that will be united includes this node.
        node2 : int
            The first tree that will be united includes this node.
        """
        root1 = self.find(node1)
        root2 = self.find(node2)
        if root1 == root2:
            # If node1 and node2 belong to the same tree, then do nothing.
            return
        rank1 = self._rank[root1]
        rank2 = self._rank[root2]
        if rank1 < rank2:
            self._parents[root1] = root2
            self._rank[root2] += rank1
        else:
            self._parents[root2] = root1
            self._rank[root1] += rank2

    def are_same(self, node1, node2):
        """
        Judges if two nodes belong to the same tree or not.

        Parameters
        ----------
        node1 : int
            The first node.
        node2 : int
            The second node.

        Returns
        : boolean
            If two nodes belong to the same tree or not.
        -------

        """
        if self.find(node1) == self.find(node2):
            return True
        else:
            return False

    def members_size(self, node):
        """
        Return the number of nodes that belong to the same tree include itself.

        Parameters
        ----------
        node

        Returns
        -------
        : int

        """
        return self._rank[self.find(node)]


N, M, K = map(int, input().split())
t = UnionFindTree(N)

friends = []
for m in range(M):
    A, B = map(int, input().split())
    t.union(A - 1, B - 1)
    friends.append([A, B])

potential_friends = [t.members_size(n) - 1 for n in range(N)]
for m in range(M):
    A, B = friends[m]
    if t.find(A - 1) == t.find(B - 1):
        potential_friends[A - 1] -= 1
        potential_friends[B - 1] -= 1

for k in range(K):
    C, D = map(int, input().split())
    if t.find(C - 1) == t.find(D - 1):
        potential_friends[C - 1] -= 1
        potential_friends[D - 1] -= 1

print(" ".join([str(i) for i in potential_friends]))


Measured memory_bytes: 35352