@charset "UTF-8";
with open('/tmp/zdb-win.txt', 'r', encoding='cp1251') as f:
for w in f:
w_clean = w.strip()
if len(w_clean) > 6 and
w_clean[2] == w_clean[5] and w_clean[3] == w_clean[6]:
print(w_clean)