Amplification of terahertz radiation by plasmons in graphene with a planar Bragg grating