All-optical shift register based on accumulated photon echo