#!/usr/bin/env python3
# slicing, if-else

with open('ascii-7.html', 'r') as h:
    asciiLines = []
    for l in h.readlines():
        asciiLines.append(l)

print(len(asciiLines))

for line in asciiLines:
    if len(line) < 30:
        print('END:', line[10:] )

    elif len(line) < 60:
        print('MIDDLE:', line[20:40] )

    else:
        print( len(line) )