with open('input.po', 'r') as input:
lines = input.readlines()
for line in lines:
prev = lines[lines.index(line) - 1]
if line.startswith('msgstr ') and prev.startswith('msgid '):
if line.lstrip('msgstr ') == prev.lstrip('msgid '):
lines[lines.index(line)] = 'msgstr ""'
with open('output.po', 'w') as output:
for line in lines:
output.write(line)
d2l0aCBvcGVuKCdpbnB1dC5wbycsICdyJykgYXMgaW5wdXQ6CiAgICBsaW5lcyA9IGlucHV0LnJlYWRsaW5lcygpCgpmb3IgbGluZSBpbiBsaW5lczoKICAgIHByZXYgPSBsaW5lc1tsaW5lcy5pbmRleChsaW5lKSAtIDFdCiAgICBpZiBsaW5lLnN0YXJ0c3dpdGgoJ21zZ3N0ciAnKSBhbmQgcHJldi5zdGFydHN3aXRoKCdtc2dpZCAnKToKICAgICAgICBpZiBsaW5lLmxzdHJpcCgnbXNnc3RyICcpID09IHByZXYubHN0cmlwKCdtc2dpZCAnKToKICAgICAgICAgICAgbGluZXNbbGluZXMuaW5kZXgobGluZSldID0gJ21zZ3N0ciAiIicKCndpdGggb3Blbignb3V0cHV0LnBvJywgJ3cnKSBhcyBvdXRwdXQ6CiAgICBmb3IgbGluZSBpbiBsaW5lczoKICAgICAgICBvdXRwdXQud3JpdGUobGluZSk=