I'll find the code, but basically its a nested for loop with gfill or something.