Lots of time and effort. Actually I shortcutted by using Word and made the pattern with "O" and "D" and then used the replace function.
I don't want to sound patronising, but I've spent a lot of time around computers so this was actually fairly easy for me to accomplish. You might want to wait until you get more experience before you try things like this.