Six cards carry the letters A, A, B, B, C and C. Cards with the same letter cannot be told apart. The six cards are placed in a row. In how many distinct rows does no letter stand immediately next to a card with the same letter? For example, ABCABC is allowed, but AABCBC is not, because its two A cards are adjacent.