А-а-а, котки два
The original Polish song appears to be much older, perhaps c.1900 - see https://www.mamalisa.com/?t=es&p=668 . The Henryk Wars & Ludwik Starski version is a fuller composition based on the original song. Unclear which the Ukrainian version was originally based on.
The Polish version almost certainly came first judging by the use of "Шарі-бурі", which is a corruption of Polish "szarobure", rather than using the Ukrainian "сірі бурі".