
NAME = 'riverrun.map'
SCALE = 3

outputstr = ''
with open(NAME, 'r') as inputf:
   lines = inputf.readlines()
   for i in range(4, len(lines), SCALE):
      line = lines[i].strip()
      for j in range(0, len(line), SCALE):
        outputstr += line[j]
      outputstr += '\n'


with open(NAME+'.txt', 'w') as outputf:
  outputf.write(outputstr)
    

