A search for lepton flavour violating decays of a neutral non-standard-model Higgs boson in the mu tau and e tau decay modes is presented. The search is based on proton-proton collisions at a center of mass energy root s = 13 TeV collected with the CMS detector in 2016, corresponding to an integrated luminosity of 35.9 fb(-1). The tau leptons are reconstructed in the leptonic and hadronic decay modes. No signal is observed in the mass range 200-900 GeV. At 95% confidence level, the observed (expected) upper limits on the production cross section multiplied by the branching fraction vary from 51.9 (57.4) fb to 1.6 (2.1) fb for the mu tau and from 94.1 (91.6) fb to 2.3 (2.3) fb for the e tau decay modes.