I'm going to take a weekend regional-express train from Bialystok, Poland (a major railway station in northeastern Poland, just like two hours away from Warsaw) to Kaunas, Lithuania.
Apparently, it's the only way to travel from Poland to Lithuania by rail. The train is operated with a diesel multiple unit and utilizes a standard-gauge track built fairly recently (unlike most of other Lithuania railways, which are 1520 mm/1524 mm). But this track terminates in Kaunas, so the abovementioned train terminates there as well.
How can I get then from Kaunas to Talinn? Most of connection search engines of European rail operators (most are based on Hafas software) doesn't even seem to have any data for most of Latvian train stations, like Riga. Lithuanian and Latvian websites are also failing to find a connection between, say, Kaunas and Riga.
In Tallinn I'm going to hop on a ferry to Helsinki, if that matters.
How can I make this connection, then? I'm almost sure it could be possible.