Step one,
Clear the bolt off the back of the case rim with a butt stoke impact/charging handle pull.
Note: if you have a carbine butt stock, pull it before making the receiver extension blow to a padded surface.
Now if the bolt is cleared, and the case is still in the chamber, pull the upper off the lower. Since you have already set the bullet back into the case, you should be able to very gently using a small wooden dowel, push the bullet into the case, shake the upper, and drain the powder grains in the case down and out the muzzle. One you are dam sure that there is no more gun powder left in the case, slowly insert a one piece cleaning rod down the bore, bottom it out against the back of the case web, then turn the whole thing over and give the cleaning rod handle a bump off the ground to dislodge the case.
Note: If you have any questions as if there is still gun powder in the case before knocking it out of the chamber, take the upper to a smith to have the case removed.