Group cohomology of groups of order 3^n