You are given an empty square grid. Each cell can be an island with a positive integer $n$ or a bridge connecting islands. The following rules apply:
- Each island with a number $n$ must have exactly $n$ bridges attached to it
- Bridges must be either horizontal or vertical with one or more cells in length
- Bridges cannot intersect, but they can meet at an island
- All islands must be connected into a single component
For example, here is a valid arrangement for islands with numbers 1 to 4:
Can you find an arrangement for islands with numbers that are the first 12 odd primes: 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41? Bonus: what is the smallest rectangle (by area) that can fit such an arrangement?