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 st x =
    match dp.[x] with
    | None ->
      let v = f g st 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))

module Lazy =
  let force (lazyVal: _ Lazy) = lazyVal.Force()

[<RequireQualifiedAccess>]
module Graph =
  type Graph (edges: int Set array) =
    static member Create count = Graph(Array.create count Set.empty)
    member this.AddEdge from to' =
      Array.modify edges from (Set.add to')
      Array.modify edges to' (Set.add from)
    member this.Edges from = Array.get edges from
    member this.HasEdge from to' = this.Edges from |> Set.contains to'

  let create = Graph.Create
  let hasEdge from to' (g: Graph) = g.HasEdge from to'
  let edges from (g: Graph) = g.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
    g.AddEdge (A-1) (B-1)
  g

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

let candis =
  let candiFrom =
    let inline f candiFrom' seen x =
      let seen' = seen |> Set.add x
      Graph.edges x friends
      |> Set.difference seen'
      |> Set.toList
      |> List.filter ((flip Set.contains seen) >> (not))
      |> List.map (candiFrom' seen')
      |> List.fold Set.union (Set.empty: int Set)
    
    memo 10007 f
  [0..(N-1)]
  |> List.map (fun x ->
    candiFrom Set.empty x
    |> Set.difference (Graph.edges x friends)
    |> Set.difference (Graph.edges x blocks)
  )

candis
|> List.map Set.count
|> List.iter (printf "%d ")
