n=id(0)%7;k=n-2&3;s='0'*k+~-n%31*'1' while~k:print s;k=s.rfind('01');s=s[:k]+'10'+s[:k+1:-1]