Need help with spliting posts into two columns

Hi,

I need help with my loop. What is does is split posts into two columns.

<?php $row_start = 1; while ( $query->have_posts() ) : $query->the_post(); ?>

<?php if ( in_array( get_the_ID(), $duplicates ) ) continue; ?>
<?php if( $row_start % 2 != 0) {// odd ?>
<div class="post">
left - <?php the_title();?><br>
</div>
<?php } ;?>
<?php if( $row_start % 2 == 0) {// even ?>
<div class="post">
right - <?php the_title();?><br>
</div>
<?php } ;?>

<?php ++$row_start; endwhile; wp_reset_postdata(); endif; ?>

It outputs the loop as the following:

<div class=”left”>post</div>

<div class=”right”>post</div>

<div class=”left”>post</div>

<div class=”right”>post</div>

<div class=”left”>post</div>

<div class=”right”>post</div>

What I would to do is to wrap all posts in a div, like the following:

<div class=”left”>

post

post

post

</div>

<div class=”right”>

post

post

post

</div>

Thanks