def clamp(num,low,high):
    if num<low: return low
    if num>high: return high
    return num
def clamp_vec3(vec3,low,high):
    return [clamp(vec3[0],low,high),
            clamp(vec3[1],low,high),
            clamp(vec3[2],low,high)]
def rndint(num):
    return int(round(num))
def rndint_vec3(vec3):
    return [rndint(vec3[0]),
            rndint(vec3[1]),
            rndint(vec3[2])]
def mult_vec3(sc,vec3):
    return [sc*vec3[0],
            sc*vec3[1],
            sc*vec3[2]]

n = 25

intensity = 0.0
step = 3.0/(n-1)
surf = []
for x in xrange(n):
    color = clamp_vec3([intensity,intensity-1.0,intensity-2.0],0.0,1.0)
    color = mult_vec3(255.0,color)
    color = rndint_vec3(color)
    surf.append(color)
    intensity += step
surf = str(surf)
surf2 = ""
for char in surf:
    if char != " ": surf2 += char
print surf2
