How to assign classes to all elements?

Jquery solution:

**assuming your posts are in a division with the class of “post”.

<script type="text/javascript">
    $(document).ready(function(){ 
      $(".post p").each(function(){ 
      $(this).addClass('paragraph'); 
       });
      $(".post ul").each(function(){ 
      $(this).addClass('list'); 
       });
      //add more lines here to select more elements
    });
</script>

Paste this in your footer.

*you need jquery installed. And better yet would be to enque this using http://codex.wordpress.org/Function_Reference/wp_enqueue_script