0

Perl, 53 + 1 = 54 bytes
Run with -n
BEGIN{$/=0}eval sprintf"say while s/%s/./;"x4,p,o,g,r
There's a little bit of trickery involved in this answer, so I'll break down what's going on.
First of all, Perl doesn't like multi-line parameters being passed. The variable $/ is the input record sep...