with open('sample.txt','r') as f:
s = []
for line in f:
if line[0] in '\r\n':
continue
s.extend((line[6:9], line[9:12], line[12:15]))
d2l0aCBvcGVuKCdzYW1wbGUudHh0JywncicpIGFzIGY6CuOAgOOAgHMgPSBbXQrjgIDjgIBmb3IgbGluZSBpbiBmOgrjgIDjgIAgICAgaWYgbGluZVswXSBpbiAnXHJcbic6CuOAgOOAgCAgICAgICAgY29udGludWUK44CA44CAICAgIHMuZXh0ZW5kKChsaW5lWzY6OV0sIGxpbmVbOToxMl0sIGxpbmVbMTI6MTVdKSkK44CA44CAICAgIA==