3 sentenced in terrorism plot