local n, m, k = io.read("*n", "*n", "*n")

local edge = {}
local avoid = {}
for i = 1, n do
  edge[i] = {}
  avoid[i] = {}
end

for i = 1, m do
  local a, b = io.read("*n", "*n")
  edge[a][b], edge[b][a] = true, true
end
for i = 1, k do
  local c, d = io.read("*n", "*n")
  avoid[c][d], avoid[d][c] = true, true
end
local parent = {}
for i = 1, n do
  parent[i] = i
end

local function uf_findroot(idx)
  local idx_update = idx
  while parent[idx] ~= idx do
    idx = parent[idx]
  end
  while parent[idx_update] ~= idx do
    parent[idx_update], idx_update = idx, parent[idx_update]
  end
  return idx
end

for i = 1, n do
  local src = i
  local rs = uf_findroot(src)
  for dst, _u in pairs(edge[src]) do
    -- table.insert(tasks, dst)
    local rd = uf_findroot(dst)
    parent[rd], parent[dst] = rs, rs
  end
end
local groups = {}
for i = 1, n do
  local r = uf_findroot(i)
  if not groups[r] then
    groups[r] = 1
  else
    groups[r] = groups[r] + 1
  end
end
local ret = {}
for i = 1, n do
  local root = uf_findroot(i)
  local cnt = groups[root] - 1
  for dst, _u in pairs(edge[i]) do
    local r = uf_findroot(dst)
    if r == root then cnt = cnt - 1 end
  end
  for dst, _u in pairs(avoid[i]) do
    local r = uf_findroot(dst)
    if r == root then cnt = cnt - 1 end
  end
  ret[i] = cnt
end
print(table.concat(ret, " "))
