Gather new cards by choosing a random subdeck, then the top card from the subdeck

Say I have the following deck:

Top Deck

  • Subdeck A
    ** Card A1
    ** Card A2
    ** Card A3
  • Subdeck B
    ** Card B1
    ** Card B2
    ** Card B3
  • Subdeck C
    ** Card C1
    ** Card C2
    ** Card C3

When studying the top deck, I would like a new card to be gathered by choosing a random subdeck, then the top card from that subdeck. I.e., the cards will be introduced in a random sequence such that A1 appears before A2, A2 appears before A3, B1 appears before B2, …, C2 appears before C3.

I am not sure if this is possible. I use Anki Desktop and AnkiMobile.

This is different than setting “New card gather order” to “Deck”, and “New card sort order” to “Random”, which is the answer here:
forums . ankiweb . net/t/get-cards-random-from-subdecks-but-gather-them-from-each-individual-subdeck-in-ascending-position/26648