T = gets.to_i q = [] T.times { q << gets.to_i } q.each {|x| puts Integer.sqrt(x) }