How many ways are there to fill in the $ 8$ spots in the picture with letters $A, B, C$ and $D$, using two copies of each letter, such that the spots with identical letters can be connected with a continuous line that stays within the box, without these four lines crossing each other or going through other spots? The lines do not have to be straight.
Problem
Source: 2020 Dürer Math Competition Finals Day2 E14 https://artofproblemsolving.com/community/c1622639_2020_
Tags: combinatorics