font_data_8x16 = '''
!
00011000
00111100
00111100
00011000
00011000
00000000
00011000
00000000

 
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000

"
01100110
01100110
00100100
00000000
00000000
00000000
00000000
00000000

#
01101100
01101100
11111110
01101100
11111110
01101100
01101100
00000000

%
00000000
11000110
11001100
00011000
00110000
01100110
11000110
00000000

&
00111000
01101100
00111000
01110110
11011100
11001100
01110110
00000000

'
00011000
00011000
00110000
00000000
00000000
00000000
00000000
00000000

(
00001100
00011000
00110000
00110000
00110000
00011000
00001100
00000000

)
00110000
00011000
00001100
00001100
00001100
00011000
00110000
00000000

*
00000000
01100110
00111100
11111111
00111100
01100110
00000000
00000000

+
00000000
00011000
00011000
01111110
00011000
00011000
00000000
00000000

,
00000000
00000000
00000000
00000000
00000000
00011000
00011000
00110000

-
00000000
00000000
00000000
01111110
00000000
00000000
00000000
00000000

.
00000000
00000000
00000000
00000000
00000000
00011000
00011000
00000000

/
00000110
00001100
00011000
00110000
01100000
11000000
10000000
00000000

0
00111000
01101100
11000110
11010110
11000110
01101100
00111000
00000000

1
00011000
00111000
00011000
00011000
00011000
00011000
01111110
00000000

2
01111100
11000110
00000110
00011100
00110000
01100110
11111110
00000000

3
01111100
11000110
00000110
00111100
00000110
11000110
01111100
00000000

4
00011100
00111100
01101100
11001100
11111110
00001100
00011110
00000000

5
11111110
11000000
11000000
11111100
00000110
11000110
01111100
00000000

6
00111000
01100000
11000000
11111100
11000110
11000110
01111100
00000000

7
11111110
11000110
00001100
00011000
00110000
00110000
00110000
00000000

8
01111100
11000110
11000110
01111100
11000110
11000110
01111100
00000000

9
01111100
11000110
11000110
01111110
00000110
00001100
01111000
00000000

:
00000000
00011000
00011000
00000000
00000000
00011000
00011000
00000000

;
00000000
00011000
00011000
00000000
00000000
00011000
00011000
00110000

<
00000110
00001100
00011000
00110000
00011000
00001100
00000110
00000000

=
00000000
00000000
01111110
00000000
00000000
01111110
00000000
00000000

>
01100000
00110000
00011000
00001100
00011000
00110000
01100000
00000000

?
01111100
11000110
00001100
00011000
00011000
00000000
00011000
00000000

@
01111100
11000110
11011110
11011110
11011110
11000000
01111000
00000000

[
00111100
00110000
00110000
00110000
00110000
00110000
00111100
00000000

\\
11000000
01100000
00110000
00011000
00001100
00000110
00000010
00000000

]
00111100
00001100
00001100
00001100
00001100
00001100
00111100
00000000

^
00010000
00111000
01101100
11000110
00000000
00000000
00000000
00000000

_
00000000
00000000
00000000
00000000
00000000
00000000
00000000
11111111

`
00110000
00011000
00001100
00000000
00000000
00000000
00000000
00000000

a
00000000
00000000
01111000
00001100
01111100
11001100
01110110
00000000

b
11100000
01100000
01111100
01100110
01100110
01100110
11011100
00000000

c
00000000
00000000
01111100
11000110
11000000
11000110
01111100
00000000

d
00011100
00001100
01111100
11001100
11001100
11001100
01110110
00000000

e
00000000
00000000
01111100
11000110
11111110
11000000
01111100
00000000

f
00111100
01100110
01100000
11111000
01100000
01100000
11110000
00000000

g
00000000
00000000
01110110
11001100
11001100
01111100
00001100
11111000

h
11100000
01100000
01101100
01110110
01100110
01100110
11100110
00000000

i
00011000
00000000
00111000
00011000
00011000
00011000
00111100
00000000

j
00000110
00000000
00000110
00000110
00000110
01100110
01100110
00111100

k
11100000
01100000
01100110
01101100
01111000
01101100
11100110
00000000

l
00111000
00011000
00011000
00011000
00011000
00011000
00111100
00000000

m
00000000
00000000
11101100
11111110
11010110
11010110
11010110
00000000

n
00000000
00000000
11011100
01100110
01100110
01100110
01100110
00000000

o
00000000
00000000
01111100
11000110
11000110
11000110
01111100
00000000

p
00000000
00000000
11011100
01100110
01100110
01111100
01100000
11110000

q
00000000
00000000
01110110
11001100
11001100
01111100
00001100
00011110

r
00000000
00000000
11011100
01110110
01100000
01100000
11110000
00000000

s
00000000
00000000
01111110
11000000
01111100
00000110
11111100
00000000

t
00110000
00110000
11111100
00110000
00110000
00110110
00011100
00000000

u
00000000
00000000
11001100
11001100
11001100
11001100
01110110
00000000

v
00000000
00000000
11000110
11000110
11000110
01101100
00111000
00000000

w
00000000
00000000
11000110
11010110
11010110
11111110
01101100
00000000

x
00000000
00000000
11000110
01101100
00111000
01101100
11000110
00000000

y
00000000
00000000
11000110
11000110
11000110
01111110
00000110
11111100

z
00000000
00000000
01111110
01001100
00011000
00110010
01111110
00000000

{
00001110
00011000
00011000
01110000
00011000
00011000
00001110
00000000

|
00011000
00011000
00011000
00011000
00011000
00011000
00011000
00000000

}
01110000
00011000
00011000
00001110
00011000
00011000
01110000
00000000

~
01110110
11011100
00000000
00000000
00000000
00000000
00000000
00000000

$
00011000
00111110
01100000
00111100
00000110
01111100
00011000
00000000
'''
font_data_8x16 = font_data_8x16.strip()


font_data_8x16_dict_as_1d_array = dict()
parts = font_data_8x16.split("\n\n")
for part in parts:
    splits = part.split("\n")
    symbol = splits[0]
    data_text = ""
    for line in splits[1:]:
        data_text += line.strip()
    font_data_8x16_dict_as_1d_array[symbol] = data_text


def get_ascii_8_times_16_font_dict():
    dict_ = {}
    parts = font_data_8x16.split("\n\n")
    for part in parts:
        splits = part.split("\n")
        symbol = splits[0]
        points = []
        for line in splits[1:]:
            points.append([int(one) for one in list(line)])
        dict_[symbol] = points
    return dict_


font_data_8x16_dict = {
    " ": [[0]*8 for i in range(16)],
}


try:
    import gc
    del font_data_8x16
    gc.collect()
except Exception as e:
    print(e)


def get_ascii_8_times_16_points_data(char):
    target_char = " "
    if char in font_data_8x16_dict:
        target_char = char
    else:
        if char in font_data_8x16_dict_as_1d_array:
            a_char_text_data = font_data_8x16_dict_as_1d_array[char]
            a_char_data = []
            index = 0
            for row in range(8):
                temp_row = [0] * 8
                for column in range(8):
                    temp_row[column] = int(a_char_text_data[index])
                    index += 1
                a_char_data.append(temp_row)
            temp_row = [0] * 8
            for row in range(8):
                a_char_data.append(temp_row)
            return a_char_data
    return list([list(one) for one in font_data_8x16_dict[target_char]])
