update A.txt and B.txt