open System

// input
let readStr () = stdin.ReadLine()

let readInt () = stdin.ReadLine() |> int
let readInts () = stdin.ReadLine().Split() |> Array.map int

// utils

let pair = function
| [|a; b|] -> (a, b)
| _ -> failwith "owatta"

let triple = function
| [|a; b; c|] -> (a, b, c)
| _ -> failwith "owatta"

let inline flip f a b = f b a  

// memoization
let inline memo size f =
  let dp = Array.create size None
  let rec g x =
    match dp.[x] with
    | None ->
      let v = f g x
      dp.[x] <- Some v
      v
    | Some v -> v
  g

let inline memo2 size1 size2 f =
  let dp = Array2D.create size1 size2 None
  let rec g x y =
    match Array2D.get dp x y with
    | None ->
      let v = f g x y
      Array2D.set dp x y (Some v)
      v
    | Some v -> v
  g

module Option =
  let getOr defaultValue = function
  | Some x -> x
  | None -> defaultValue

module Array =
  let modify array i f = Array.set array i (f (Array.get array i))

type Graph = Graph of int Set array
module Graph =
  let create count = Graph (Array.create count Set.empty)
  let addEdge (Graph edges) from to' =
    Array.modify edges from (Set.add to')
    Array.modify edges to' (Set.add from)
  let hasEdge from to' (Graph edges) = Array.get edges from |> Set.contains to'
  let edges from (Graph edges) = Array.get edges from

let N,M,K = readInts() |> triple

let friends =
  let g = Graph.create N
  for _ in 1..M do
    let (A, B) = readInts () |> pair
    Graph.addEdge g (A-1) (B-1)
  g

let blocks =
  let g = Graph.create N
  for _ in 1..K do
    let (C, D) = readInts () |> pair
    Graph.addEdge g (C-1) (D-1)
  g

let isCandiEdge a b =
  let rec f seen a' =
    let seen' = seen |> Set.add a'
    if a' = b then true
    else
      let edges = Graph.edges a' friends
      Set.difference edges seen
      |> Set.toSeq
      |> Seq.exists (f seen')
  f Set.empty a

let result =
  seq {
    for a in 0..(N-1) do
      for b in 0..(N-1) do
        if a <> b then yield (a, b)
  }
  |> Seq.filter (fun (a, b) -> (not (Graph.hasEdge a b friends)) && (not (Graph.hasEdge a b blocks)) && isCandiEdge a b)
  |> Seq.groupBy (fun (a, _) -> a)
  |> Seq.map (fun (a, seq) -> a, seq |> Seq.length)
  |> Map.ofSeq

for i in 0..(N-1) do
  result.TryFind i
  |> Option.getOr 0
  |> printf "%d "