Short answer. You own it together. Where a mixture happens by chance and the things cannot be separated without injury, each owner acquires a right in the mass proportional to what he contributed, measured by the value of the things mixed rather than by bulk alone.
What the law says
each owner shall acquire a right proportional to the part belonging to him, bearing in mind the value of the things mixed or confused
Civil Code, Article 472 — Mixture (Commixtion/Confusion). Read the full provision →
Co-ownership of the mass, in shares
The outcome is not that one of you wins the grain and the other is paid off. Each owner shall acquire a right proportional to the part belonging to him — the mixed mass is held by both of you in shares, and each share reflects what its owner put in. That is a real change in the character of what you own. Before the mixture you owned specific sacks; afterwards you own a fraction of a single mass, which you can sell, divide or have partitioned, but which you no longer hold as a separate and identifiable thing of your own.
Value, not just volume
The proportion is worked out bearing in mind the value of the things mixed or confused, and that qualification matters whenever the two contributions are not identical. Grain of a better variety, a higher grade or a drier condition is not equal, sack for sack, to grain of a poorer one, and a rule that counted only volume would quietly transfer value from the better lot to the worse. Where both lots are genuinely the same commodity of the same quality, value and quantity give the same answer and the point does not arise.
The two conditions in the article
The rule addresses a mixture made by the will of their owners or one that occurs by chance, and in the second case it applies only where the things are not separable without injury. Both limits are practical. If the two lots can still be told apart and separated without harming either, nothing has been transformed and each owner simply takes back his own. And a mixture brought about deliberately by one owner without the other's consent is not the accident this article deals with; it is governed by the rules that follow it.
What settles the shares in practice
Disputes of this kind are decided on records made before the mixture, so the useful documents are the ordinary ones of a harvest: weight tickets, delivery and warehouse receipts, drying or milling records, grading notes and any sale contracts showing the price each lot was to fetch. Photographs and a joint measurement of the combined mass taken as soon as the mixture is discovered are worth arranging with the other owner. Agreeing the two figures early — how much and of what quality each side contributed — usually resolves the whole matter without anyone going to court.