Three men captured while fighting with Ukraine's military are among the five released.