The process of denitrification converts ammonia to: