void printStep()
    {
        System.err.println("##### Tick " + tick + " #####");

        // print right bound parking lot

        for (int i = 0; i != nsegments; ++i) {
            System.err.printf("%d->", right[i].size());
            int nspace = 4 * nblocks[i] - 1;
            printSpaces(nspace - spaces(right[i].size()) + 1);
        }
        System.err.println();

        // print traffic
        for (int seg = 0; seg != nsegments; ++seg) {
            System.err.print(" |");
            
            for (int block = 0; block != nblocks[seg]; ++block) {
                System.err.print(" ");
                if (segments[seg][block] == null)
                    System.err.print("---");
                else if (segments[seg][block].dir > 0)
                    System.err.printf("%2d>", segments[seg][block].startTime);
                else if (segments[seg][block].dir < 0)
                    System.err.printf("<%-2d", segments[seg][block].startTime);
            }
        }
        System.err.print(" |");
        System.err.println();

        // print left bound parking lot
        printSpaces(4 * nblocks[0] - 1 + 3);
        for (int i = 1; i != nsegments + 1; ++i) {
            System.err.printf("%d<-", left[i].size());

            if (i != nsegments) {
                int nspace = 4 * nblocks[i] - 1;
                printSpaces(nspace - spaces(left[i].size()) + 1);
            }
        }
        System.err.println();
    }