open System.Collections.Generic

let edgeOver2 roads num =
    let gone = HashSet<int>()
    let rec count roads num =
        roads
        |> Map.find num
        |> Seq.iter (fun elem ->
            if gone.Contains(elem) then
                ()
            else
                gone.Add(elem) |> ignore
                count roads elem)
    count roads num
    Set(gone)

let main =
    let n, m, k = stdin.ReadLine().Split() |> Array.map int |> fun array -> array.[0], array.[1], array.[2]
    let abArray = 
        [| for _ in 1..m -> stdin.ReadLine().Split() |> Array.map int |> fun [|a;b|] -> a, b |]
    let cdArray = 
        [| for _ in 1..k -> stdin.ReadLine().Split() |> Array.map int |> fun [|c;d|] -> c, d |]

    let roads =
        abArray
        |> Array.append (abArray |> Array.map (fun (a, b)->(b, a)))
        |> Array.groupBy (fun (a, b) -> a)
        |> Array.map (fun (x, array) ->x, array |> Array.map snd)
        |> Map.ofSeq
    
    let predicate4 num = edgeOver2 roads num 
    let friend num = 
        Map.tryFind num roads 
        |> function
        |Some(v) -> Set.ofSeq v
        |None -> Set.empty

    let blocked num = 
        cdArray
        |> Array.append (cdArray |> Array.map (fun (c, d)->(d, c)))
        |> Array.groupBy (fun (c, d) -> c)
        |> Array.map (fun (x, array) ->x, array |> Array.map snd)
        |> Map.ofArray
        |> Map.tryFind num
        |> function
        |None -> Set.empty
        |Some(v) -> Set.ofSeq v

    let own num = Set.ofSeq [num]

    let out num= 
        predicate4 num
        |> fun s -> Set.difference s (friend num) 
        |> fun s -> Set.difference s (blocked num) 
        |> fun s -> Set.difference s (own num) 
        |> Set.count

    [1..n]
    |> Seq.map out 
    |> Seq.map string
    |> Seq.reduce (fun acc x -> acc + " " + x)
    |> stdout.WriteLine