Flapping motions of the tail plasma sheet induced by the interplanetary magnetic field variations