#!/bin/bash
cp nextperm.s nextperm.in
while true; do
	cp selfdual.s selfdual.out
	java nextperm_sm >> selfdual.out || break
	cat nextperm.out
	./check.exe selfdual.in selfdual.out selfdual.out && break
	mv nextperm.out nextperm.in
done
