Process for dyeing and printing