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

let debug x =
  printfn "%A" x
  x

// 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 rec candisFrom seen x =
    let seen' = seen |> Set.add x
    let edges = friends |> Graph.edges x
    let result: int Set =
      edges
      |> Set.toSeq
      |> Seq.filter (fun c -> not (seen |> Set.contains c))
      |> Seq.map (candisFrom seen')
      |> Set.unionMany 
      |> Set.union edges
    result
  [0..(N-1)]
  |> List.fold
    (fun (seen, connected) x -> 
      match connected |> Map.tryFind x with
      | Some _ -> seen, connected
      | None ->
        let conn = candisFrom seen x
        let seen' = Set.union seen conn
        let connected' = conn |> Set.fold (fun st k -> st |> Map.add k conn) connected
        seen', connected'
    ) (Set.empty, Map.ofList []): int Set * Map<int, int Set>
  |> (fun (_, connected) -> connected)

seq { 0..(N-1) }
|> Seq.map (fun x -> 
  Map.find x candis
  |> (flip Set.difference (friends |> Graph.edges x))
  |> (flip Set.difference (blocks |> Graph.edges x))
  |> Set.remove x
  |> Set.count)
|> Seq.iter (printf "%d ")