German teenager sentenced to six years for stabbing police officer