#![allow(non_snake_case)]
#![allow(dead_code)]
#![allow(unused_macros)]
#![allow(unused_imports)]

use std::cmp::*;
use std::collections::*;

macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};

    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
    ($iter:expr, mut $var:ident : $t:tt $($r:tt)*) => {
        let mut $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    }
}

macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };

    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };

    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };

    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };

    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}

macro_rules! chmax {
    ($x:expr, $e:expr) => {
        if $x < $e {
            $x = $e;
        }
    };
}
macro_rules! chmin {
    ($x:expr, $e:expr) => {
        if $x > $e {
            $x = $e;
        }
    };
}

const INF: i64 = 1 << 60;

struct Solver {
    users: Vec<i64>,
}

impl Solver {
    fn new(N: usize) -> Solver {
        Solver { users: vec![-1; N] }
    }
    fn dfs(&mut self, i: usize, l: i64, g: &Vec<Vec<usize>>) {
        if self.users[i] != -1 {
            return;
        }
        self.users[i] = l;
        for &i in &g[i] {
            self.dfs(i, l, g);
        }
    }
}

use std::iter::IntoIterator;

fn join_string<T, S>(elems: T) -> String
where
    T: IntoIterator<Item = S>,
    S: ToString,
{
    elems
        .into_iter()
        .map(|i| i.to_string())
        .collect::<Vec<String>>()
        .join(" ")
}

fn main() {
    input!{
        N: usize,
        M: usize,
        K: usize,
        AB: [(usize1, usize1); M],
        CD: [(usize1, usize1); K],
    }
    let mut to = vec![Vec::new(); N];
    for &(A, B) in &AB {
        to[A].push(B);
        to[B].push(A);
    }
    let mut s = Solver::new(N);
    let mut l = 0;
    for i in 0..N {
        if s.users[i] != -1 {
            continue;
        }
        s.dfs(i, l, &to);
        l += 1;
    }
    let mut counter = vec![0; l as usize];
    for i in 0..N {
        counter[s.users[i] as usize] += 1;
    }
    let mut ans = vec![0; N];
    for i in 0..N {
        ans[i] += counter[s.users[i] as usize] - 1;
    }
    for i in 0..M {
        let &(A, B) = &AB[i];
        if s.users[A] != s.users[B] {
            continue;
        }
        ans[A] -= 1;
        ans[B] -= 1;
    }
    for i in 0..K {
        let &(C, D) = &CD[i];
        if s.users[C] != s.users[D] {
            continue;
        }
        ans[C] -= 1;
        ans[D] -= 1;
    }
    println!("{}", join_string(ans));
}


Measured memory_bytes: 26872