#!/bin/bash
fpc genall.dpr
dcc32 -cc genall.dpr
rm all.txt
for len in `seq 1 5`; do
	for seq in `echo $len | genall`; do
		echo $seq > brackets.in
		java -cp .. brackets_sm
		cnt=`cat brackets.out`
		echo "$cnt $seq" >> all.txt
	done
done