Add groovy answer using for statement and each method