echopraxia

an immediate, involuntary, and senseless repetition of the movements of others, occurring in some types of mental derangement.