Logic Gates for Terahertz Frequencies Fabricated by Three-Dimensional Printing