I've written a program that does all the work.