using System;
using System.Collections.Generic;
using System.Linq;

public class AtCoderD
{
    static void Main()
    {
        int n;
        int m;
        int k;
        {
            var line = Console.ReadLine();
            var words = line.Split(' ');
            n = int.Parse(words[0]);
            m = int.Parse(words[1]);
            k = int.Parse(words[2]);
        }

        List<List<int>> friendGroups = new List<List<int>>();
        bool[,] friends = new bool[n, n];
        for (int i = 0; i < m; i++)
        {
            var line = Console.ReadLine();
            var words = line.Split(' ');
            int a = int.Parse(words[0]);
            int b = int.Parse(words[1]);

            friends[a - 1, b - 1] = true;
            friends[b - 1, a - 1] = true;

            List<int> groupA = null;
            List<int> groupB = null;
            foreach (List<int> group in friendGroups)
            {
                if (group.Contains(a))
                {
                    groupA = group;
                }
                if (group.Contains(b))
                {
                    groupB = group;
                }
            }
            if (groupA == null && groupB == null)
            {
                List<int> list = new List<int>();
                list.Add(a);
                list.Add(b);
                list = list.Distinct().ToList();
                friendGroups.Add(list);
            }
            else if (groupA == null)
            {
                groupB.Add(a);
                groupB = groupB.Distinct().ToList();
            }
            else if (groupB == null)
            {
                groupA.Add(b);
                groupA = groupA.Distinct().ToList();
            }
            else if (groupA != groupB)
            {
                groupA.AddRange(groupB);
                groupA = groupA.Distinct().ToList();
                friendGroups.Remove(groupB);
            }
        }

        bool[,] blocks = new bool[n, n];
        for (int i = 0; i < k; i++)
        {
            var line = Console.ReadLine();
            var words = line.Split(' ');
            int a = int.Parse(words[0]);
            int b = int.Parse(words[1]);
            blocks[a - 1, b - 1] = true;
            blocks[b - 1, a - 1] = true;
        }

        string answer = "";
        for (int i = 1; i <= n; i++)
        {
            List<int> targetGroup = null;
            foreach (List<int> group in friendGroups)
            {
                if (group.Contains(i))
                {
                    targetGroup = group;
                    break;
                }
            }

            if(targetGroup == null)
            {
                answer += " " + 0;
                continue;
            }

            int count = 0;
            foreach (int num in targetGroup)
            {
                if (i == num)
                {
                    continue;
                }
                if (friends[i - 1, num - 1])
                {
                    continue;
                }
                if (blocks[i - 1, num - 1])
                {
                    continue;
                }
                count++;
            }
            answer += " " + count;

        }

        Console.WriteLine(answer.Trim());
    }
}