require 'matrix'

$stdin = DATA if $stdin.eof?

gets
ARGF.each_line do |line|
  x1, y1, x2, y2, x3, y3 = line.split.map(&:to_r)
  a = Vector[x1, y1]
  b = Vector[x2, y2]
  c = Vector[x3, y3]

  ab = b - a
  bc = c - b
  ca = a - c

  ar = bc.r
  br = ca.r
  cr = ab.r

  as = ar**2
  bs = br**2
  cs = cr**2

  q1 = (as * (bs + cs - as) * a + bs * (as + cs - bs) * b + cs * (as + bs - cs) * c)
  q2 = 2 * (as * bs + bs * cs + cs * as) - (as**2 + bs**2 + cs**2)
  rcc =  q1 / q2

  s1 = ar * br * cr
  s2 = Math.sqrt((ar + br + cr) * (-ar + br + cr) * (ar - br + cr) * (ar + br - cr))
  r = s1 / s2

  puts [*rcc.to_a, r].map{|e| format("%.3f", e) }.join("\s")
end