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

namespace AtCoder
{
	class Program
	{
		public static void Main()
		{
#if TextInput
			using(var reader = new StreamReader(Debug.SampleTextPath)) 
			{
				Console.SetIn(reader);
#endif
				var intArray = IO.ReadIntArray();
				var answerNums = new int[intArray[0]];
				var unionFind = new UnionFind(intArray[0]);
				for(var iIndex = 0 ; iIndex < intArray[1] ; ++ iIndex)
				{
					var friendIntArray = IO.ReadIntArray();
					-- friendIntArray[0];
					-- friendIntArray[1];
					unionFind.Union(friendIntArray[0] , friendIntArray[1]);
					-- answerNums[friendIntArray[0]];
					-- answerNums[friendIntArray[1]];
				}
				unionFind.Normalize();

				for(var iIndex = 0 ; iIndex < intArray[2] ; ++ iIndex)
				{
					var blockIntArray = IO.ReadIntArray();
					-- blockIntArray[0];
					-- blockIntArray[1];
					if(unionFind.Parents[blockIntArray[0]] == unionFind.Parents[blockIntArray[1]])
					{
						-- answerNums[blockIntArray[0]];
						-- answerNums[blockIntArray[1]];
					}
				}

				for(var iIndex = 0 ; iIndex < intArray[0] ; ++ iIndex)
				{
					answerNums[iIndex] += (unionFind.RootNums[unionFind.Parents[iIndex]] - 1);
				}
				IO.Write(answerNums);
#if TextInput
			}
#endif
		}

		private class UnionFind
		{
			public int[] Parents;
			public int[] RootNums;
			public UnionFind(int iRootNum)
			{
				Parents = Enumerable.Range(0 , iRootNum).ToArray();
				RootNums = new int[iRootNum];
			}
			public void Normalize()
			{
				for(var iIndex = 0 ; iIndex < Parents.Length ; ++ iIndex)
				{
					var rootIndex = _GetRoot(iIndex);
					++ RootNums[rootIndex];
					Parents[iIndex] = rootIndex;
				}
			}
			public void Union(int iNumber0 , int iNumber1)
			{
				var rootNumber0 = _GetRoot(iNumber0);
				var rootNumber1 = _GetRoot(iNumber1);
				if(rootNumber0 < rootNumber1)
				{
					Parents[rootNumber1] = rootNumber0;
				}
				else
				{
					Parents[rootNumber0] = rootNumber1;
				}
			}
			public int _GetRoot(int iNumber)
			{
				return (Parents[iNumber] == iNumber) ? iNumber : _GetRoot(Parents[iNumber]);
			}
		}
	}

	public static class IO
	{
		public static string   Read()								 { return Console.ReadLine(); }
		public static string[] ReadArray(char iSplitter = ' ')		 { return Read().Split(iSplitter); }
		public static int	   ReadInt()							 { return int.Parse(Read()); }
		public static int[]	   ReadIntArray(char iSplitter = ' ')	 { return ReadArray().Select(iText => int.Parse(iText)).ToArray(); }
		public static long	   ReadLong()							 { return int.Parse(Read()); }
		public static long[]   ReadLongArray(char iSplitter = ' ')	 { return ReadArray().Select(iText => long.Parse(iText)).ToArray(); }
		public static double   ReadDouble()							 { return double.Parse(Read()); }
		public static double[] ReadDoubleArray(char iSplitter = ' ') { return ReadArray().Select(iText => double.Parse(iText)).ToArray(); }
		public static char[]   ReadCharArray()						 { return Read().ToCharArray(); }

		public static void Write(string iValue)									   { Console.WriteLine(iValue); }
		public static void Write(int iValue)									   { Console.WriteLine(iValue); }
		public static void Write(IEnumerable<int> iValue , string iJoinWord = " ") { Console.WriteLine(string.Join(iJoinWord , iValue)); }
		public static void Write(long iValue)									   { Console.WriteLine(iValue); }
		public static void Write(double iValue)									   { Console.WriteLine(iValue); }
		public static void Write(decimal iValue)								   { Console.WriteLine(iValue); }
		public static void Write(bool iValue)									   { Console.WriteLine(iValue ? "Yes" : "No"); }
	}

	public static class Util
	{
		public static long Gcd(long i0 , long i1) { return (i0 > i1) ? _Gcd(i0 , i1) : _Gcd(i1 , i0); }
		public static long Lcm(long i0 , long i1) { return (i0 * i1) / Gcd(i0 , i1); }
		public static long ModPow(long iBaseNumber , long iPow , long iModNumber)
		{
			var num = 1L;
			while(iPow != 0)
			{
				if((iPow & 0x1) != 0)
				{
					num = (num * iBaseNumber) % iModNumber;
				}
				iBaseNumber = (iBaseNumber * iBaseNumber) % iModNumber;
				iPow >>= 1;
			}
			return num;
		}
		public static long CombinationNum(int iLeftNumber , int iRightNumber)
		{
			if(iRightNumber == 0) { return 1; }
			if(iLeftNumber == 0)  { return 0; }
			return iLeftNumber * CombinationNum(iLeftNumber - 1 , iRightNumber - 1) / iRightNumber;
		}

		private static long _Gcd(long i0 , long i1)	{ return (i1 == 0) ? i0 : _Gcd(i1 , i0 % i1); }
	}
}


Measured memory_bytes: 23052