Ukraine took unexpected steps to turn tide in its war with Russia