def decode_image(layer_list):
    """
    Takes list of image layer strings as input.
    
    Produces an output by looking through each layer until the following:
    If a digit is 0 that means that pixel is black.
    If a digit is 1 that means the pixel is white.
    If a digit is 2 that means the pixel is transparent.
    
    The first layer with a 0 or 1 pixel will dictate the color of that pixel.
    """

    decoded = []
    
    for i in range(len(layer_list[0])):
        
        layer = 0
              
        while True:
            if layer_list[layer][i] == '0':
                decoded.append('0')
                break
            elif layer_list[layer][i] == '1':
                decoded.append('1')
                break
            
            layer += 1
   
    return decoded