writeq(Term) writes the Prolog term Term into the current output stream, quoting atoms which need quotes.