def w(l): s,b,g=0,0,777 for a in range(n): while b