A wire is first bent into the shape of a square. Each side of the square is 6 cm long. Then the wire is unbent and reshaped into a triangle. If each side of the triangle has equal length, what is this length?