var in =`00000000000000000000000000000000011111111100000001111111100000000111000111100000111100111100000001110000111000001110000111000000011100011110000011100000000000000111111111000000111000000000000001110111100000001110000111000000011100111100111011110011110111000111000111101110011111111001110000000000000000000000000000000000`

# Thanks to [http://www.network-science.de/ascii/ this site] and vim for these next two examplessmallrc01 ='''\00000000000000000000000000000000011111111100000001111111100000000111000111100000111100111100000001110000111000001110000111000000011100011110000011100000000000000111111111000000111000000000000001110111100000001110000111000000011100111100111011110011110111000111000111101110011111111001110000000000000000000000000000000000\'''

First I define a function zs which given a point and its eight neighbours returns 1 if the point may be culled, 0 otherwise. g indicates if this is step 1 or step 2 in the task description. zs may be changed to remember the step independently if the reader does not wish to explore the algorithm.