Japan surrendered unconditionally shortly afterwards , ending World War Two .