#!/bin/bash
# your code goes here

awk -v RS='^.{7}' 'RT{sub(/.$/,"",RT); ORS=RT"D";print} END{ORS="";print}'