Interfacing carbon nanotubes of arbitrary chiralities into linear heterojunctions