$*=<>;map{$'*~-$'<<$_^$||print$_+$'," 0"x$_," 1 "x$'}!//..30for 1..30