gets e=gets.split.map &:to_i d=[0,-1,0,1] c=[] until d.size>e.size c<