let nmk = readLine()!.split(separator: " ").map { Int($0)! }
let (n, m, k) = (nmk[0], nmk[1], nmk[2])

var friends = [Int: [Int]]()
var blocks = [Int: [Int]]()

for _ in 0..<m {
  {
    let ab = readLine()!.split(separator: " ").map { Int($0)! }
    let (a, b) = (ab[0], ab[1])
    friends[a] = friends[a] ?? []
    friends[a]?.append(b)
    friends[b] = friends[b] ?? []
    friends[b]?.append(a)
  }()
}

for _ in 0..<k {
  {
    let cd = readLine()!.split(separator: " ").map { Int($0)! }
    let (c, d) = (cd[0], cd[1])
    blocks[c] = blocks[c] ?? []
    blocks[c]?.append(d)
    blocks[d] = blocks[d] ?? []
    blocks[d]?.append(c)
  }()
}

var groups = [Set<Int>]()
var checked = Set<Int>()
var groupsIndices = [Int: Int]()

var groupsIndex = 0

for person in 1...n {
  if checked.contains(person) {
    continue
  }
  var stack = [Int]()
  var group = Set<Int>()
  stack.append(person)
  checked.insert(person)
  group.insert(person)
  groupsIndices[person] = groupsIndex

  while let now = stack.popLast() {
    if let news = friends[now] {
      news.forEach { new in
        if !checked.contains(new) {
          stack.append(new)
          checked.insert(new)
          group.insert(new)
          groupsIndices[new] = groupsIndex
        }
      }
    }
  }
  groups.append(group)
  groupsIndex += 1
}

var result = [Int]()

for person in 1...n {
  let groupsIndex = groupsIndices[person] ?? -1
  let friend = friends[person].map { Set($0) } ?? Set<Int>()
  let block = blocks[person].map { Set($0) } ?? Set<Int>()
  let fr = groups[groupsIndex].subtracting(block).subtracting(friend)
  result.append(fr.count - 1)
}

print(result.map { String($0) }.joined(separator: " "))
