finding the repetition direction
merged file