This is a document with the general information about your four options: Poland, Slovakia, Moldova and Hungary:
https://docs.google.com/document/d/1mcwLM8Oon4xKc1Az9qaNYz-hFFDaEpfk/mobilebasic
You can get information on the waiting times at each border here:
https://docs.google.com/spreadsheets/d/e/2PACX-1vTmKNAxZn2cPpBqPHnRx9Hc_GPzfi7U92h05hkNuES6pA8l7IcbfdRELMkTBWGcBFoRkUdwlnfX889X/pubhtml?gid=0&single=true
In general, unless you have someone you trust waiting for you at the border, the best course of action is to get transportation for one of the welcoming shelters.