autopopulate option in cascading autocomplete if it is the only option

autopopulate option in cascading autocomplete if it is the only option

Hi

trying to create cascading autocomplete e.g.
1. CITY
2. STREET
3. NUMBER

and once the 1st autocomplete is selected then child elements get autopopulated with option(s) if it is the only one. E.g. there can be the only one street in the city and the only one building number on that street so I' like to be STREET and NUMBER automatically to get their value in such case.

In case there is more options then classic widget will be shown.

Could you please nudge me closer to solution how to extend autocomplete to work like above please
Thank you in advance
kr