Nominalization of tausend. The interjection is short either for potz tausend Teufel (16th century) or for Middle High German tūsentlisteler, later Tausendkünstler (“the devil as a master of a thousand ruses, arts”).
Практикуйте говорение и запоминание " Tausend " и многих других слов и предложений в немецкий .